How to choose a printer for each report (1 Viewer)

sys00

New member
Local time
Today, 12:42
Joined
Feb 3, 2020
Messages
16
welcome

I have a report that I print on the printer (HP Color LaserJet Pro M252dw) and a report that I print on the printer (Zebra GK420t - ZPL)
How do I print each report on a dedicated printer without changing the default printer ?

thank you
 

theDBguy

I’m here to help
Staff member
Local time
Today, 02:42
Joined
Oct 29, 2018
Messages
21,358
Go to Design View of each report and assign a specific printer to them.

1633194486180.png
 

sys00

New member
Local time
Today, 12:42
Joined
Feb 3, 2020
Messages
16
Thank you

Is there a code to save the name of the report and the printer assigned to print the report ?
 

isladogs

MVP / VIP
Local time
Today, 09:42
Joined
Jan 14, 2017
Messages
18,186
This info is taken from: MS Access – Select a Printer | DEVelopers HUT (devhut.net)
You can use code like this:

Code:
Dim strDefaultPrinter  as string

' get current default printer.
strDefaultPrinter = Application.Printer.DeviceName

' switch to printer of your choice:
Set Application.Printer = Application.Printers("HP LaserJet Series II")

'do whatever....print reports

'Switch back to default.
Set Application.Printer = Application.Printers(strDefaultPrinter)

OR see Printer Selection Utility (allenbrowne.com)
 

Users who are viewing this thread

Top Bottom