How do I make a print all reports button that prints all reports that have data in them?

I have an Access 2003 report that has a lot of reports on it.  I have to print them one at a time.  I would like to create a print all button that only prints the reports that have data in them. PROSEP-DYPROTEC-Backup.zip
datadigiAsked:
Who is Participating?
 
DockieBoyCommented:
Lol, ok, strange, it shows up in my post at my end. Should be an attachment to post Id: 34935541
0
 
DockieBoyCommented:
Are you looking to add a button to the Form "frmReportDialog" that will print every report?
0
 
datadigiAuthor Commented:
yes, I am.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
datadigiAuthor Commented:
I have to go and pick up my daughters now.  I will be gone for about 30-40 minutes and then back.
0
 
DockieBoyCommented:
Add a button to that form and code it as follows;

Private Sub Mybutton_Click()
 Dim rpt as Object
  For Each rpt in Application.CurrentProjec.AllReports
  DoCmd.OpenReport rpt.name, acViewNormal
 Next rpt
End Sub

To only print reports with data you could set the criteria in the query for each report to exclude Null values And/Or Zero Length Strings.
0
 
datadigiAuthor Commented:
I'm back.  I will try it out!
0
 
datadigiAuthor Commented:
could you just give me the database?
0
 
DockieBoyCommented:
I have not changed any queries to filter out Null values or zero length strings as I am unsure as to what data is a requirement.

 PROSEP-DYPROTEC-Backup.zip
0
 
datadigiAuthor Commented:
I am still unsure of what to do...
0
 
DockieBoyCommented:
Hmm, ok, sorry, but I will need to start from the top.

Presently you select the reports option from the switchboard and the reports form opens.  You then click on one of the report options and the report will print?
0
 
datadigiAuthor Commented:
presently I go to the switchboard and select print a report.  then it goes to the FrmReportDialog.  From there I have to click the reports one at a time to print.  What I want is a print all button added that will print all of the reports.  Preferably only the ones that have data in them, but if it is a big deal then I can throw those away...  
0
 
DockieBoyCommented:
Ok, so when you open the db that I sent back and go to the FrmReportDialog form, can you see the new label with the blue writing that says "Print All Reports" ?
0
 
datadigiAuthor Commented:
database that you sent back? I didn't get a database back.
0
 
datadigiAuthor Commented:
oh lol,  the one at the beginning!
0
 
datadigiAuthor Commented:
Thank you
0
 
DockieBoyCommented:
Another alternative is to change the on click event of the new label I created to "mfrmDialogGroup", this will run the whole macro group that the other labels run specific macros from.

Happy to help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.