Printer Control From Access

  • Thread starter Thread starter Ilya
  • Start date Start date
I

Ilya

Hi everybody:
I need to specify printer at run time. When the user
selects report with chart, color printer shall be default
one, instead of black and white when printing bulk of text
reports.
Please, advise how to...
Thanks in advance,
Ilya.
 
Illya:

Normally you want to do this by specifying the default printer before you
output the report (leaving the report set to output to the default). How to
do this is a bit different for Access Xp vs any previous version of Access.
In Xp, use the Application.Printers collection and Printer object to adjust
the default, in previous versions of Access you need to set the Windows
default via api calls. You can find code on this in the MS Knowledgebase in
the support area of the MS web; alternately if you don't want to code it out
yourself, take a look at our "On the Fly Printing" classes on our site which
make it as easy as:

Dim objPrinter as New PrintersClass
With objPrinter
.SetCurrentDefault = "Tektronix Phaser 780"
End With

HTH
 
Back
Top