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:
- Open a new form in Design view.
- Click the Command Button tool in the Toolbox.
- Click and drag in the form where you want the tool.
- Click Cancel to close the Command Button wizard if necessary.
- Right-click the command button and select Properties.
- Click in the Caption property box under the All tab and enter Print Employee Report.
- Click the Event tab and click the On-Click property box.
- Select [Event Procedure] from the drop-down list.
- Click the Build button.
- Enter the following code at the prompt:
DoCmd.SelectObject acReport, "Employees", True DoCmd.Printout ,,,,5
- 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.