I've recently started working on a database I developed about a year ago and it now gives me compile errors because of the following code. It doesn't recognize the Access.Printer. This worked fine when developed but I can't recall which COM reference is needed to make it function again. Can anyone out there help refresh my memory and tell me about Access.Printer.
Dim intPrinterOrientation As Integer
Dim oPrinter As Access.Printer
' This form needs to be printed in landscape mode
' Save the value of the current mode so it can be reset later
' and set the mode to landscape.
Set oPrinter = Access.Printer
intPrinterOrientation = oPrinter.Orientation
oPrinter.Orientation = acPRORLandscape
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Access.Printer.Orientation = acPRORPortrait -------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
Dim intPrinterOrientation As Integer
Dim oPrinter As Access.Printer
' This form needs to be printed in landscape mode
' Save the value of the current mode so it can be reset later
' and set the mode to landscape.
Set oPrinter = Access.Printer
intPrinterOrientation = oPrinter.Orientation
oPrinter.Orientation = acPRORLandscape
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Access.Printer.Orientation = acPRORPortrait -------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------