Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print multiple reports

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Can anyone help me? I have the need to print multiple reports. I have a form with a field called [copy], the intention is that the user enters the amount of copies that have to be printed in this field. Can anyone give me a syntax for printing multiple reports. Any help would be highly appreciated. Whooops, almost forgot, I'm talking about Access2000. Thanks..
 
I believe you could use the docmd.printout

Create a loop that holds the report name and the quantity and then loop through code something like this

Private Sub Print0_Click()
On Error GoTo Err_Print0_Click

Dim stDocName As String
Dim holdcnt As Integer

stDocName = recordset!reportname

holdcnt = recordset![print quantity]
DoCmd.OpenReport stDocName, acPreview
DoCmd.PrintOut acPrintAll, , , , holdcnt, True
DoCmd.close acReport, stDocName, acSaveNo

Exit_Print0_Click:
Exit Sub

Err_Print0_Click:
msgbox ERR.Description
Resume Exit_Print0_Click

End Sub


Hope this helps
 
Code:
Public Sub PrintReportCopys(Amount As Integer)
Dim i As Integer
For i = 1 To Amount
   DoCmd.OpenReport "ReportName", acViewNormal
Next i
End Sub
Hope this helps if not let me know

Jn88
Jn88@att.net
 
See DougP's solution in thread181-7065
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top