Specify a printer

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I need to specify a printer for a particualr report (labels).
Any thoughts as to how I could do this?
 
Don said:
I need to specify a printer for a particualr report (labels).
Any thoughts as to how I could do this?

You don't mention what version of ms-access.

In access 2002 and later, there is a built in printer object, and it lets
you switch the printer with ease.

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 default printer.
strDefaultPrinter = Application.Printer.DeviceName

switch to printer of your choice:

Set Application.Printer = Application.Printers("HP LaserJet Series II")

do whatever..(launch your report)


Switch back.

Set Application.Printer = Application.Printers(strDefaultPrinter)

Note that you don't have use the above code, and you can open up the report
in design mode and go file->page setup. You see a option to select a
specific printer and then Access will remember that printer
setting regardless of your default printer.
 
Back
Top