[AccessD] Landscape Form Printing

Dale Kalsow dkalsow at yahoo.com
Tue Oct 21 15:54:15 CDT 2003


Good Afternoon,
 
I have the following code in Access XP, behind a button.  I am trying to print the screen to the default printer in landscape.
 
Dim rpt As Printer
    
    Application.Printer = Application.Printers(0)
    
    With rpt
        .BottomMargin = 720
        .Copies = 1
        .Duplex = acPRDPVertical 'Double sided
        .PaperBin = acPRBNLargeCapacity
        .Orientation = acPRORPortrait
    End With
    DoCmd.PrintOut acPrintAll, 1, 1, acHigh, 1, True
    Set Application.Printer = Nothing
 
I get the error "Object with Block Variable not set " on the .BottomMargin line.
 
Does any one know how to fix this?
 
Thanks in advance!
 
Dale


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search


More information about the AccessD mailing list