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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print setup causing error message

Status
Not open for further replies.
Jul 5, 2002
28
US
I am using the command "DoCmd.RunCommand (acCmdPrint)" to call the print dialog box from a form. When I try to change the printer setup, using the print dialog box "Setup..." button, I get an "action can't be carried out" error message. Any way to get around this?
-jamie
 
Try putting some error handling in the OnClick event. Like Below:

On Error GoTo Err_Command0_Click

DoCmd.RunCommand (acCmdPrint)

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
Resume Exit_Command0_Click

Let me know if this doesn't work.
 
Thank you for your post. Error handling corrects the error when you try to cancel the dialog box, but when you click on the setup button (ion the print dialog box) you still get an error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top