Access 2002. How to print Access Report the on certain printer? Need the code to see. Thanks.

S

shopping777

I need to let user to choose printer on the form and print report on
that certain printer (Printer1, Printer2).
I am beginner in VBA. I have heard about Printer Object in Access 2002
but never use it. So please put the code. Thank you.
 
S

shopping777

See:
Printer Selection Utility - Users assign printers to reports
at:
http://allenbrowne.com/AppPrintMgt.html

The sample database contains the code, or you can view it here:
http://allenbrowne.com/AppPrintMgtCode.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.






- Show quoted text -

Allen, Thanks for answer.

I have a problem with your code. May be I did something wrong but it
did not allowed me to choose the printer.
Instead I got message "You must have report active ..." (?) when I
pressed button "Set Printer". What does it mean?
The other problem is that Access did not find OpentheReport
procedure. It can not see it. Any suggestions?

Thanks,
Eugene
 
A

Allen Browne

You do need to open the report in order to use the custom Set Printer
toolbar button. The sample database demonstrates that.

Put the code (including the OpenTheReport() function) in a standard module
so Access can find it - not the module of a report or form.
 

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