The situation may arise where it is always necessary to print out a specified number of copies of a Microsoft Access 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.
Private Sub [Your_Command_Button]_Click() 'Open report in Preview mode DoCmd.OpenReport "[Your_Report_Name_Goes_Here]", acViewPreview 'Print out specified number of report copies DoCmd.PrintOut , , , , 2 End Sub
Another approach to this is to use a function, that incorporates a loop, that will then accept the Microsoft Access report name and specified number of report copies to be printed:
Public Function PrintMultipleCopies(strReportName As String, _ bytNumberOfCopies As Byte) Dim bytCounter As Byte For bytCounter = 1 To bytNumberOfCopies DoCmd.OpenReport strReportName Next bytCounter End Function
You can then call this function, from a command button in your Microsoft Access Form for example, by using:
Private Sub [Your_Command_Button]_Click() 'Prints out named [report x amount of copies] required Call PrintMultipleReports("[Your_Report_Name_Goes_Here]", 2) End Sub