If you are using a2002 or later, you can use:
You can use:
Set Application.Printer = Application.Printers("HP LaserJet Series II")
So, to save/switch, you can use:
dim strDefaultPrinter as string
' get current defualt printer.
strDefaultPrinter = Application.Printer.DeviceName
' swtich to printer of your choice:
Set Application.Printer = Application.Printers("HP LaserJet Series II")
do whatever.
Swtich back.
Set Application.Printer = Application.Printers(strDefaultPrinter)
If you are using an earlier version of ms-access, then you can grab my SHORT
printer switch code, and it lets you do the above like:
Thus, when printing a report, you can:
1) save the default printer into a string
strCurrentPtr = GetDefaultPrinter
2) switch to your report printer
SetDefaultPrinter strReportsPtr
' 3) print report
4) switch back to the default printer
SetDefaultPrinter strCurrentPtr
So, if using an earlier version of ms-access, then you can get my short and
easy printer change code at:
http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html