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 copies of report via code

Status
Not open for further replies.

Vidar13

IS-IT--Management
Apr 4, 2001
90
0
0
US
Is there a quick and dirty way to print multiple copies of the same report without using a code counter (do/while)?

What I'd like to do is have a field on a form with a "number of copies" to be used to print that many copies of the report.
 
Can't think of one. Why not use the loop? Easy enough, yeah?

Jeremy

Sub PrintXCopies()
Dim intCount As Integer
intCount = me!txtNumberOfCopies
Do Until intCount = 0
intCount = intCount - 1
Call DoCmd.OpenReport("ReportName")
Loop
End Sub
=============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.


Remember to reward helpful tips with the stars they deserve.
 
Use this

Dim i as Integer
i = Forms!FormName!NumberofCopiesField
DoCmd.SelectObject acReport, "rptName", True
DoCmd.PrintOut acPrintAll,,,i

That should do it.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top