A
Alphonse Giambrone
When printing an open report to a specific printer, in Access 2000 the
default printer can be changed via code/api.
In later versions, there is the easier to use Application.printer object.
What to do for an application that needs to be able to run under both 2000
and 2002?
Yes the Access version can be detected via code, but the
'Application.Printer' code can't be included as it won't compile under 2000.
For example the following works & compiles fine in Access 2002, but won't
compile in 2000 because there is no Application.Printer object:
If SysCmd(acSysCmdAccessVer) > 9 Then
Application.Printer = Application.Printers("Desired Printer")
Else
Call ChangeToDesiredPrinter
End If
I thought of trying to use conditional compilation, but that requires a
constant and I need to be able to detect Access version on the fly.
Any ideas?
TIA
default printer can be changed via code/api.
In later versions, there is the easier to use Application.printer object.
What to do for an application that needs to be able to run under both 2000
and 2002?
Yes the Access version can be detected via code, but the
'Application.Printer' code can't be included as it won't compile under 2000.
For example the following works & compiles fine in Access 2002, but won't
compile in 2000 because there is no Application.Printer object:
If SysCmd(acSysCmdAccessVer) > 9 Then
Application.Printer = Application.Printers("Desired Printer")
Else
Call ChangeToDesiredPrinter
End If
I thought of trying to use conditional compilation, but that requires a
constant and I need to be able to detect Access version on the fly.
Any ideas?
TIA