Printing to different printers in Access Basic

I'm using Access 2000 to generate some reports. I need (within an Access module) to programmatically print each report to a series of different printers (none of which is potentially the machine's default printer). The names of the different printers I'm retrieving from the database. I've seen several articles talking about the "Prtdevnames" property but cannot find any good examples. I know within VB this must be possible - can anyone help ?
Who is Participating?
TrygveConnect With a Mentor Commented:
MIDA: What if gng does not have that book?

gng: Have you looked on the info and article links that I posted?
Link to article:

"Change printers from code"

In order to change printer information, you must use APIs.

The PrtDevNames property stores the name of the printer, and the PrtDevMode property stores the driver information. Both of these properties need to be changed in order to change the printer driver. If the PrtDevMode property does not match the PrtDevNames property (that is, the PrtDevMode property describes a different driver than the PrtDevNames property) a General Protection (GP) Fault may occur.

Visit these links for more details and solutions.

"How to Change a Report's Printer Using Code (MS KB)" -

"Chapter 10:   Controlling your printer (MS KB)" -

"Download the code ( from here (Courtesy of Ken Getz)." -

or, if you need ready code to pop into your application,

"On The Fly Printing (ATTAC Group)" -
Go to chapter 7 of Access 20000 developper handbook, volume 1, getz, Litwin, Gilbert, Sybex edition.
gngAuthor Commented:
Thanks ! - the Ken Getz link was just what was needed !
Happy to have helped :-))
All Courses

From novice to tech pro — start learning today.