Print 2 copies of a report using OpenReport Method

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.
 
G

GVaught

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.
 
A

Al Moroz

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
 
J

Jacko

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.
 
J

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top