Specify a Printer

AccessNub

Registered User.
Local time
Today, 13:17
Joined
Jul 22, 2006
Messages
71
Heya,

Lookin for the VB code to program a button to send a Form to a specific Printer. I know that you can set it in the Print Settings, but I want it to the button directly.

Also, if its possible, I need to know how set the Print button to use a specific tray on the printer instead of the default one.
 
Try

Dim stDocName
Dim strDefaultPrinter As String
DoCmd.OpenReport stDocName, acNormal

strDefaultPrinter = Application.Printer.DeviceName
Set Application.Printer = Application.Printers("Printer Name")
DoCmd.OpenReport stDocName, acNormal
Set Application.Printer = Application.Printers(strDefaultPrinter)
 

Users who are viewing this thread

Back
Top Bottom