I developed a large Access 97 application (over 400 forms and 300 reports) that is being used by over 200 happy companies. Access 97 is fantastic and my 6 employees are making a very good living from it! I've patiently waited for 2007 SP1 and the runtime but unfortunately there are still some major bugs. My one big complaint is the 2007 bug that prevents printer setup settings from being saved to a report. I must either devise a way of switching the default printer to the user's intended device and then switch it back again after printing, or else continue to wait (forever) for MS to fix the bug. What would you do?
Try the following tip from
www.aadconsulting.com
Tip and Code Sample: Switching Printers from within your MS Access Application
Fellow Access developer, Mark Plumpton, of customdata.co.nz, has kindly provided sample code for easily switching printers on the fly while printing Access reports, with code as simple as this...
- SaveDefaultPrinter
-
DefaultPrinter = "HP Laserjet (A3)"
-
DoCmd.OpenReport "rptTest", acViewNormal
-
RestoreDefaultPrinter
Download these demo Access97/2000 databases, which include a class module that performs the function of listing and switching default printers.
http://www.aadconsulting.com/printers.zip
The code is also an excellent example of how you can use classes in your MS Access applications.