Software

Create a command button to print multiple copies of an Access report

If you often need to print out the same number of Access report copies, Mary Ann Richardson explains how you can create a command button that will print the copies for you.

You often need to print five copies of an Access report for meetings. To save time, you can create a command button that will print the copies for you. Follow these steps:

  1. Open a new form in Design view.
  2. Click the Command Button tool in the Toolbox.
  3. Click and drag in the form where you want the tool.
  4. Click Cancel to close the Command Button wizard if necessary.
  5. Right-click the command button and select Properties.
  6. Click in the Caption property box under the All tab and enter Print Employee Report.
  7. Click the Event tab and click the On-Click property box.
  8. Select [Event Procedure] from the drop-down list.
  9. Click the Build button.
  10. Enter the following code at the prompt:

DoCmd.SelectObject acReport, "Employees", True
DoCmd.Printout ,,,,5

  1. Press [Alt]Q.

Now when you need to print out five copies, simply click the Print Employee Report command button in your form.

Miss an Access tip?

Check out the Microsoft Access archive, and catch up on other Access tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

3 comments
megladden
megladden

I use this method to print on our invoices, which are nothing more than presorted colored paper - white, yellow, pink, green. In this case, you need to add a ,FALSE after the number of copies, which gives me: DoCmd.Printout ,,,,4,FALSE This tells Access NOT to collate the printouts, which you definitely wouldn't want in my example.

burch_r
burch_r

Very helpful. I've searched the help files for such information without success and had to build loops with counter variables to control the number of copies. This solution is much more elegant and more efficient in regards to network traffic. (My old work-around had to resend the job for each copy.)

simon.brown
simon.brown

Hi - one little gotcha: you're assuming that users only have one printer or that they always want to print these reports to their defualt printer. Especially as its a multi-copy print (potentially lots of paper) it should confirm the printer via msgbox to the user first and allow them to cancel or switch printers. Could you add that bit?