View Full Version : Report Default Printer


ASherbuck
12-20-2008, 11:44 AM
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) (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
12-20-2008, 03:30 PM
you would have to open it in design mode, to set the default printer

you cant do it at runtime

scalextric59
12-20-2008, 06:57 PM
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
12-23-2008, 08:04 AM
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
02-19-2009, 02:09 PM
Nice...I just used this to print a page with multiple subforms to a PDF.