Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on clicking "Print" button on a form

Status
Not open for further replies.

mmiram

IS-IT--Management
Feb 4, 2005
45
US
Hi:

I have an Access Form. I created a button to print the form and have the following VBA code in the "Onclick" event for that button:

Private Sub print_Click()
On Error GoTo Err_print_Click

Forms("AgentDetailsPreview").Printer.Orientation = acPRORLandscape
DoCmd.PrintOut

Exit_print_Click:
Exit Sub

Err_print_Click:
MsgBox Err.Description
Resume Exit_print_Click

End Sub

It works great on my computer but it does not work on my boss's computer. It generates the following error

application-defined or object-defined error.

Why would that be?

Thanks.
 
Same version of access ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
The printer object/collection didn't appear until Access 2002.

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top