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
348 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
[X]
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
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

687 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