473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Print Multiple Reports Based on One Criteria

3
I have one button printing 5 reports base on a Query with one criteria.
It works BUT THE PROBLEM:

I have to put in the date for each report so it will print. I want to put the date in once and all 5 reports prints


Query:
Field: Last Service Record
Criteria: [last service date].[text]
Expand|Select|Wrap|Line Numbers
  1. Private Sub btn_prnt_rpt_date_Click()
  2. On Error GoTo Err_btn_prnt_rpt_date_Click
  3.  
  4.     Dim stDocName As String
  5.  
  6.     stDocName = "rpt_Date_Crew_Cheif"
  7.     DoCmd.OpenReport stDocName, acNormal
  8.  
  9.     stDocName = "rpt_Date_FM"
  10.     DoCmd.OpenReport stDocName, acNormal
  11.  
  12.     stDocName = "rpt_Date_Label"
  13.     DoCmd.OpenReport stDocName, acNormal
  14.  
  15.     stDocName = "rpt_Date_Service"
  16.     DoCmd.OpenReport stDocName, acNormal
  17.  
  18.     stDocName = "rpt_Date_Work"
  19.     DoCmd.OpenReport stDocName, acNormal
  20.  
  21.  
  22. Exit_btn_prnt_rpt_date_Click:
  23.     Exit Sub
  24.  
  25. Err_btn_prnt_rpt_date_Click:
  26.     MsgBox Err.Description
  27.     Resume Exit_btn_prnt_rpt_date_Click
  28.  
  29. End Sub
Jan 6 '10 #1
3 4916
NeoPa
32,556 Expert Mod 16PB
This seems so blatant I'm thinking maybe I've missed something. As a new member I'll give you the opportunity to send me a PM explaining why this question is any different from Print 3 reports with one button that you've already asked.

If there is no difference then this a simple double-post and is not allowed on this site. I'll allow you 24 hours to reply (by PM) before I delete the thread. If you convince me this is a different question then I'll happily open it back up again.

Until then it's locked to further posting by ordinary members.
Jan 7 '10 #2
NeoPa
32,556 Expert Mod 16PB
Clearly I missed something. My bad.
Yes it IS a different problem. The first time I couldn't print multiple reports with one button. In which the problem was solved. Now with the DIFFERENT button I want to print reports base on a date. I want to press the button access generates a "criteria window" in which I put in the date. BUT it pops up the window for each report. I just want it to pop up once and print all 5
Jan 7 '10 #3
NeoPa
32,556 Expert Mod 16PB
I assume that all these 5 reports are either based on the same query, or they are all based on queries which have a commen reference to a date prompt.

We need to sort out how best to replace this (these) with different references that will work without any prompt required. It will be easier, and facilitate clear communication, if you could explain what's happening here with relation to the query(ies). That way the solution can be more sensitive to your context.

I imagine the best way forward for you is to enter the date on a form and to refer to this control in your query references. How exactly we should do that we will know better when you give us the extra information.
Jan 7 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steven Stewart | last post by:
Hi there, I have posted about this before, but yet to arrive at a solution. I am going to try to explain this better. I have an Employees table and a Datarecords table (one-to-many...
6
by: NOSPAMrclark | last post by:
I'm wondering . . . . What is the generally accepted method for calling reports from multiple locations? Example: REPORT-A is called by selecting a record in a listbox and clicking a...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
0
by: neoteny2 | last post by:
I need MS Access to automatically create reports/subreports based on specific criteria. I am building a database in Access 2003 with different locations/sites. I have the "sites" table created...
7
by: Ceebaby via AccessMonster.com | last post by:
Hi All Here's hoping someone can help me with this. I have a report based on a query where the criteria for 4 of the fields is set from an unbound form. I want the user to be able to select any...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
5
by: Brett | last post by:
Hello, Is it possible to have just one criteria and have it apply to a group of queries? I am trying to create a report with the separate results of 4 queries based on a prompt for the user...
2
by: dlevene | last post by:
Hi - newbie here, be gentle. In Access 2003, I've created a report (based on a query) to produce mailing labels for all records where = "Community". is a combo-box field with the values coming from...
4
by: jvan2008 | last post by:
"Form1" combobox "cboModel" Row Source SELECT ., . FROM tblModel ORDER BY ; combobox "cboContactName" SELECT . FROM Query1 ORDER BY ;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.