Link to home
Start Free TrialLog in
Avatar of datadigi
datadigiFlag for United States of America

asked on

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
Avatar of DockieBoy
DockieBoy

Are you looking to add a button to the Form "frmReportDialog" that will print every report?
Avatar of datadigi

ASKER

yes, I am.
I have to go and pick up my daughters now.  I will be gone for about 30-40 minutes and then back.
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.
I'm back.  I will try it out!
could you just give me the database?
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
I am still unsure of what to do...
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?
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...  
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" ?
database that you sent back? I didn't get a database back.
ASKER CERTIFIED SOLUTION
Avatar of DockieBoy
DockieBoy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oh lol,  the one at the beginning!
Thank you
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