ACC2: PrtDevMode Settings Do Not Work Under Windows 95 or Later (140286)
The information in this article applies to:
This article was previously published under Q140286 SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
When you run Microsoft Access version 2.0 under Windows 95 or later, a
database that uses an Access Basic procedure to set a form or report's
PrtDevMode property doesn't change the Print Setup settings correctly. The
same procedure works correctly when you run Microsoft Access 2.0 under
Windows 3.x.
CAUSE
The PrtDevMode property mirrors the Windows DEVMODE structure. This
structure has changed in Windows 95 and later.
Part of the process of changing a form or report's PrtDevMode property is
to store the current PrtDevMode structure in a string variable. An
application can use the zwtDevModeStr type defined in the WZFRMRPT wizard
library if this library is being loaded. If the library is not being
loaded, as is the case with a run-time application, a common alternative is
to copy this type declaration from the Wizard module to the Declarations
section of one of the application's modules.
The string element RGB in this structure is defined as 64 bytes. The new
DEVMODE structure requires this string to be larger.
RESOLUTION
If your application does not contain this type declaration, include a new
type declaration and change the references to the old structure. If your
application already has this type declaration, change the size of the
string element.
REFERENCES
For more information about using PrtDevMode, please see the following
articles in the Microsoft Knowledge Base:
129397 ACC: How to Change a Report's Printer Using Code
129748 ACC: Using the PrtDevMode Property to Verify Custom Page
Size
129722 ACC2: Using the PrtDevMode Property to Change Page
Orientation
For more information about the PrtDevMode Property, search for
"PrtDevMode," and then "PrtDevMode" topic using the Microsoft Access Help
menu.
Modification Type: | Major | Last Reviewed: | 9/7/2001 |
---|
Keywords: | kbprb kbprint KB140286 |
---|
|