Printing a Report on a command button

A

Aaron

Hello all,

I am needing some help with a piece of code I have. The code prints a
report on a printer that is not the default printer set on the PC. The issue
I have is the database window is hidden and when they click the button to run
this code is appears. How do I get it to not appear?


Set Application.Printer = Application.Printers("DOWNSTAIRS BIZ HUB")
DoCmd.SelectObject acReport, "rptEntry", True
DoCmd.PrintOut
Set Application.Printer = Nothing

Thanks in Advance,
Aaron
 
M

Maurice

Try this:

Set Application.Printer = Application.Printers("DOWNSTAIRS BIZ HUB")
DoCmd.printreport "rptEntry"
Set Application.Printer = Nothing
 

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