Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2011-02-19
16
335 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:datadigi
  • 9
  • 7
16 Comments
 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935214
Are you looking to add a button to the Form "frmReportDialog" that will print every report?
0
 

Author Comment

by:datadigi
ID: 34935240
yes, I am.
0
 

Author Comment

by:datadigi
ID: 34935253
I have to go and pick up my daughters now.  I will be gone for about 30-40 minutes and then back.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935260
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
 

Author Comment

by:datadigi
ID: 34935507
I'm back.  I will try it out!
0
 

Author Comment

by:datadigi
ID: 34935516
could you just give me the database?
0
 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935541
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
 

Author Comment

by:datadigi
ID: 34935549
I am still unsure of what to do...
0
 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935559
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
 

Author Comment

by:datadigi
ID: 34935574
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
 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935589
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
 

Author Comment

by:datadigi
ID: 34935622
database that you sent back? I didn't get a database back.
0
 
LVL 3

Accepted Solution

by:
DockieBoy earned 500 total points
ID: 34935631
Lol, ok, strange, it shows up in my post at my end. Should be an attachment to post Id: 34935541
0
 

Author Comment

by:datadigi
ID: 34935661
oh lol,  the one at the beginning!
0
 

Author Closing Comment

by:datadigi
ID: 34935680
Thank you
0
 
LVL 3

Expert Comment

by:DockieBoy
ID: 34935698
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

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question