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.
How to print multiple reports at a time
Collapse
X
-
Tags: None
-
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:
Code:Dim obj As AccessObject Const con_ID_PREFIX As String = "rptPer" For Each obj In Application.CurrentProject.AllReports If Left$(obj.Name, 6) = con_ID_PREFIX Then 'Print Report if it contains the Prefix DoCmd.OpenReport obj.Name, acViewNormal End If Next obj -
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.Comment
-
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!Comment
Comment