Full Version: Print multiple reports.
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
svnthtysvn
Hi, this is very urgent...how do I use a print button to open a report in print view and print 2 reports, not just one? THanks!!!!
Larry Larsen
Hi
Taken from an article:

Printing multiple copies of the same Report

If you want to print out multiple copies of a report, then you can use the PrintOut Method, provided that the report is the active object, i.e. you need to firstly open the report in Preview mode. Another way of doing this would be to repeatedly use the OpenReport Method:

DoCmd.OpenReport "rptName"
DoCmd.OpenReport "rptName"
DoCmd.OpenReport "rptName"

The way that I have done this before is to use a short procedure that accepts the report name and the number of copies to be printed, and then uses a For...Next loop to print the required number of copies:

Sub sPrintMultipleReportCopies(strReportName As String, bytNumberCopies As Byte)
Dim bytCounter As Byte
For bytCounter = 1 To bytNumberCopies
DoCmd.OpenReport strReportName
Next bytCounter
End Sub

I can then call this procedure:

Call sPrintMultipleCopies("rptName",3)

Which will give me 3 copies of the report called 'rptName'.

HTH's
thumbup.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.