Is it possible to select a printer for some reports (1 Viewer)

sys00

New member
Local time
Today, 13:20
Joined
Feb 3, 2020
Messages
16
Hello

I have more than 3 printers and more than 10 reports..
How do I send a report to a specific printer using the code ?

Thank
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:20
Joined
May 7, 2009
Messages
19,169
Code:
Dim t
t = Timer + 0.2
On Error GoTo err_handler
DoCmd.OpenReport "ReportName", acViewPreview
While Timer < t
    DoEvents
Wend
DoCmd.RunCommand acCmdPrint
err_handler:
DoCmd.Close acReport, "ReportName"
 

sys00

New member
Local time
Today, 13:20
Joined
Feb 3, 2020
Messages
16
thank you all

I have a virtual printer
HP Color LaserJet Pro M252 PCL 6
There are other printers on the network

The report ( aa ) is designed on the label printer
Zebra GK420t - ZPL
How can I direct the report ( aa ) to the Zebra GK420t - ZPL printer using the code

thank you all
thank you all
 

bastanu

AWF VIP
Local time
Today, 03:20
Joined
Apr 13, 2010
Messages
1,401
Have a look t this thread (found in the Similar Threads at the bottom of the page):


You can create a table to store the report names and their associated printers then use the code in the thread to open the report in print preview, change the printer then print the report.

If you get stuck please post what you have tried.
Cheers,
 

Users who are viewing this thread

Top Bottom