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
306 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
 
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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
Familiarize people with the process of utilizing SQL Server views 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 Access…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now