Printing to different printers in Access Basic

Hi,
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 ?
gngAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TrygveCommented:
Link to article: http://www.mvps.org/access/reports/rpt0009.htm


"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)" - http://support.microsoft.com/support/kb/articles/q129/3/97.asp

"Chapter 10:   Controlling your printer (MS KB)" - http://www.microsoft.com/AccessDev/Articles/GetzCh10.HTM

"Download the code (DefaultPrt.zip) from here (Courtesy of Ken Getz)." - http://www.mcwtech.com/Downloads.htm

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

"On The Fly Printing (ATTAC Group)" - http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
0
MIDACommented:
Go to chapter 7 of Access 20000 developper handbook, volume 1, getz, Litwin, Gilbert, Sybex edition.
0
TrygveCommented:
MIDA: What if gng does not have that book?

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gngAuthor Commented:
Thanks ! - the Ken Getz link was just what was needed !
0
TrygveCommented:
Happy to have helped :-))
Trygve
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.