473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to print multiple reports at a time

I have about 7 reports in access I need to print on a weekly basis. I wanted to know if there is any way I can do this faster then printing individual reports.
Mar 12 '10 #1
4 14432
ADezii
8,834 Expert 8TB
The trick is to preface each of the 7 Reports with a Unique Qualifier as identified by the Constant con_ID_PREFIX. When you run the following code, only those reports containing this Unique Prefix will be printed. In this demo I simply used rptPer:
Expand|Select|Wrap|Line Numbers
  1. Dim obj As AccessObject
  2. Const con_ID_PREFIX As String = "rptPer"
  3.  
  4. For Each obj In Application.CurrentProject.AllReports
  5.   If Left$(obj.Name, 6) = con_ID_PREFIX Then
  6.     'Print Report if it contains the Prefix
  7.     DoCmd.OpenReport obj.Name, acViewNormal      
  8.   End If
  9. Next obj
Mar 12 '10 #2
Couldn't you also simply create a macro with seven separate actions of "OpenReport" where the View setting is set to "Print."

Between each "OpenReport" action, you could insert a "Close" action that closes each specific report with it set to either save or not save the report upon closing.

The macro could be tagged to a button on a form or whatever you'd want so you could print all seven reports with one click.
Mar 12 '10 #3
ADezii
8,834 Expert 8TB
You definitely could take that approach, but I'll rarely suggest the use of a Macro over VBA Code for multiple reasons, the most critical of which is that there is no mechanism to Trap any Error(s) that may occur.
Mar 12 '10 #4
NeoPa
32,556 Expert Mod 16PB
Using macros is not generally recommended for various reasons, the principal being that they have such a limited interface. Why spend effort learning a system equivalent to a pair of trousers (pants) with a belt around the knees. That said, we welcome all ideas, and your contribution is appreciated.

The reports would also need to be printed of course, and potentially closed depending on requirement. Printing is done using DoCmd.PrintOut().

Welcome to Bytes!
Mar 13 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: SpamProof | last post by:
I'd like to be able to print multiple documents are once using vb.net. What is the best way to do this with out having to print each document one at a time via a loop . Can't I send them all to...
2
by: Sigurd Bruteig | last post by:
Hi all! I have a problem printing multiple reports. The code i use is: Dim stDocName As String stDocName = "rptInvoice" DoCmd.OpenReport stDocName, acNormal, , " = date()" The problem is that...
3
by: MHenry | last post by:
Hi, I have 30 separate Access reports to print to pdf files. Presently, I print these reports to Acrobat pdf files one report at a time. I am looking for some help, or a program or add-in...
3
by: TDIOwa | last post by:
I have a report printing form (Access 97) in which I print different reports from. I have added a combo box that selects the number of copies that I want to print. Here is the rub... The...
2
by: Rod | last post by:
We've got an old VB6 application which has 9 Crystal Reports it can print. These 9 reports are considered by our users to be in essence one "report", in the sense that they are all related and they...
2
by: Thall | last post by:
Hey Gurus - I've seen a few solutions to this problem, but none of which I can do without a little help. Here's the situation The following code loops thru a sales report, using the sales rep ID...
3
by: gurpreetintown | last post by:
One button is required on the main page to print 5 reports associated with 5 different report viewer controls on different forms.
3
by: mode67 | last post by:
I have one button printing 5 reports base on a Query with one criteria. It works BUT THE PROBLEM: I have to put in the date for each report so it will print. I want to put the date in once and...
0
by: mgarg005SSRS | last post by:
My requirement is to create multiple reports (.rdlc) and show them using single report viewer control. A: User selects a report from drop down list. B: Depending on report name a report has to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.