The information in this article applies to:
Advanced: Requires expert coding, interoperability, and multiuser skills. SUMMARYYou can change the printer for a report or form in two ways:
MORE INFORMATIONMethod 1: Changing the Microsoft Windows Default PrinterIn the Page Setup dialog box, you can select whether forms or reports are printed by either a default printer or a specific printer. If you select a default printer, the form or report is printed to the Windows default printer. If you want to change to another default printer, you must change the Windows default printer.To change the Windows default printer by using Visual Basic code, use WriteProfileString to change the Device= entry of the Windows section of the Win.ini file. Method 2: Setting the PrtDevNames and PrtDevMode propertiesThe PrtDevNames property stores the name of the printer, and the PrtDevMode property stores the driver information. You need to change both of these properties 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.To change the printer driver, you must do the following:
REFERENCESFor more information about the PrtDevMode and the PrtDevNames properties, click Microsoft Access Help on the
Help menu, type "PrtDevMode, PrtDevNames" in the Office Assistant or the Answer Wizard,
and then click Search to view the topic. http://www.microsoft.com/AccessDev/Articles/GetzCh10.HTMFor more information about WriteProfileString, the Win.ini, and the Default Printer in Windows, consult the Microsoft Developers Network CD-ROM (MSDN). Additional query words:
Keywords : kbprint kbdta PtrSetup |
Last Reviewed: May 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |