Discussion Locked

controling printers with Microsoft Acess

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have one application in Microsoft Access(MDE file), and i need to get all the control of the printers, because i need to select a diferent printer to print 2 diferent reports. I'm sending one report to the default printer without a preview(normal), but with the other report i'm getting a preview, in this report(preview) with a right clic allows me to select another printer to send it when i need it. But, in the preview mode the user can print the report several times, and that's what i don't want.
I wanna to define a couple of named printers(local o network printers) and send one report to one printer(i.e. "Texas") y the other to a diferent one(i.e. "California")..but without a preview mode.

I know that in the design mode you can choose one printer to set it as the default printer of he report...but that isn't a good idea it's static..and i need to work dinamically with my printers, i only need to send it by code to diferent printer.

With Microsoft Visual Basic i can use the "Printer" object..and whith this object i can set by code an existing printer name, no matter if the printer isn't the default printer.
I want to do the same thing with VBA(Visual basic for applications) in Microsoft Access

I hope you can help me..it could be with code or a third part software or class..doesn't matter, i need to work properly.

3 replies

by jhermiz

Im quite sure access 2k2 addresses this..if not you'll have to play with the registry :). Yes the registry...I think Ken Getz or litwin has some posted code on changing default printers along with a module to help out. I know they had one for Adobe automatic creation of reports in access. I use that code to reset / set printers as well. Look it up in google.
Jon

This discussion is closed to new replies.