From: Aaron on
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
From: Maurice on
Try this:

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

--
Maurice Ausum


"Aaron" wrote:

> 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