Printers

Print multiple copies of an Access report

Printing multiple copies of an Access report is a simple task and easy to automate using the PrintOut method.

When you print a report manually, you have the opportunity to specify the number of copies in the Print dialog box. Automating the process is simple too — just execute the PrintOut method as follows: DoCmd.PrintOut printrange, pagefrom, pageto, printquality, copies, collatecopies As you can see, the fifth argument is copies; specify the number of copies using this argument. For instance, the following statement opens and prints four copies of a report named Invoices: DoCmd.OpenReport "Invoices", acViewPreview DoCmd.PrintOut , , , , 4 If the report is already open, make sure it's current before printing, as follows: DoCmd.SelectObject acReport, "Invoices", True DoCmd.PrintOut , , , , 4 If you want to print only one copy, you can do so immediately from the OpenReport method by changing acViewPreview to acViewNormal, as follows: DoCmd.OpenReport "Invoices", acViewNormal This statement will send the Invoices report directly to the printer. If users need more flexibility, create a print form that captures page numbers and copy count and pass those values to the report via the OpenReport method.

About Susan Harkins

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

Editor's Picks

Free Newsletters, In your Inbox