I guess I should have indicated that I am running it multi-user
environment. I would appreciate the code.
Note that access XP does have built in the ability to switch printers. So,
while my code *should* work, you do NOT need it in a2002.
You can use:
Set Application.Printer = Application.Printers("HP LaserJet Series II")
The above means you don't need my code.
So, to save/switch, you can use:
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....
Switch back.
Set Application.Printer = Application.Printers(strDefaultPrinter)
If you are using a earlier version of ms-access, then I have a short and
simple printer switch routine here that does NOT requite you to flip the
report into design mode:
You can find this short piece of code here:
http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html