Report Default Printer (1 Viewer)

ASherbuck

Registered User.
Local time
Yesterday, 18:14
Joined
Feb 25, 2008
Messages
194
Hey all,
I've been trying to set up a form that will allow a user to choose a default printer for a report, sort of like the functionality in the page setup options for Access (2007).

All my searching is pointing me to Allen Browne's Print Selection Utility (http://allenbrowne.com/AppPrintMgt.html)
But this isn't what I'm looking for and I'm having a difficult time modifying his utility to fit my needs.

The main problem is that the utility allows a user to choose the default printer from an add-in toolbar at the print preview screen, which would be fine, however I am distributing a package and have the Access screen hidden/resized.

The desired goal is to have a preferences form where the reports are listed and a printer can be chosen for each one. I've gotten so far as to list the reports and available printers, I just don't know how to set the report to always default to that printer.

Any advice would be appreciated.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 02:14
Joined
Sep 12, 2006
Messages
15,723
you would have to open it in design mode, to set the default printer

you cant do it at runtime
 

scalextric59

Registered User.
Local time
Yesterday, 18:14
Joined
Dec 20, 2008
Messages
87
You can change it in VBA before opening the report:

Application.Printer = Application.Printers(printer_name)

and then to return to the original printer:

Application.Printer = Nothing

Hope this helps.
 

ASherbuck

Registered User.
Local time
Yesterday, 18:14
Joined
Feb 25, 2008
Messages
194
Thanks Scale,
That works great. I was able to store the printer information for the reports in a table and call it up anytime I print. Works great.
 

UniqueTII

What?
Local time
Yesterday, 20:14
Joined
Apr 4, 2002
Messages
96
Nice...I just used this to print a page with multiple subforms to a PDF.
 

Users who are viewing this thread

Top Bottom