Printing a Report on a command button

  • Thread starter Thread starter Aaron
  • Start date Start date
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
 
Try this:

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