Print 2 copies of a report using OpenReport Method

  • Thread starter Thread starter Jacko
  • Start date Start date
J

Jacko

I have a report based on a query. The query requires the user to enter a
variable. I have a report accessed from a command button but I need it to
print 2 copies of the report. Problem is, I am having to press the button
twice and ask the user to input the same variable twice! Is there anyway
round this other than previewing the report and then printing 2 copies?
Thanks.
 
Set the report to print under print preview rather than sending the report
to print directly; this can be set via a command button on a form or through
the switchboard menu. If the user picks Print from File | Print they will be
prompted with the print dialog box and then can select 2 copies to print.

You might be able to do through code, however I do not have any code that
will help you out in this regard.
 
Don't forget about Access Help... If you read Help
on 'OpenReport Method' then click <See Also>, you would
have seen the 'PrintOut Method'. Combine those two
methods for this code in the on-click event of your button:

DoCmd.OpenReport "<Report_Name>", acViewPreview
DoCmd.PrintOut acPrintAll, , , , 2

The '2' indicates 2 copies.

Al Moroz
http://www.abacus-strategies.com

**NOTE: Do not respond to the email address, it's for
Newsgroups only
 
Thanks a million. I did check Access Help first and was aware of both these
commands, but must have missed or not figured out that the 2 could be
combined! Seems obvious now! Thanks again. Jacko.
 
Thanks!

GVaught said:
Set the report to print under print preview rather than sending the report
to print directly; this can be set via a command button on a form or through
the switchboard menu. If the user picks Print from File | Print they will be
prompted with the print dialog box and then can select 2 copies to print.

You might be able to do through code, however I do not have any code that
will help you out in this regard.
 
Back
Top