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

DoCmd.PrintOut dialog box with Cancel causing problems

Status
Not open for further replies.

cmgrn

Programmer
Nov 28, 2001
43
0
0
US
I have MS Access 2002 unbound form that is only 2 pages long and has a Submit step that prints the form, sends the data to excel and clears the form.

I am using "DoCmd.PrintOut" because it gives me a perfect snapshot of the form and its entries BUT it also shows a dialog box ("Printing page 1 of 2" etc) with a Cancel command button.

Some users have been able to click the Cancel button to cancel the print but the result is that it kills the balance of the job.

On my computer, the dialog goes by so fast that I cannot repeat the error. I do not know how they are managing to cancel the print. It shows for only a fraction of a second.

Is there a way to...
1) prevent the dialog from showing altogether
2) disable the Cancel button
3) trap the Cancel button and ignore it so the print continues
4) prevent the Cancel from killing the remaining steps
???

I am currently trying "On Error Resume Next".
Also, "DoCmd.SetWarning False" did not seem to work.

Thanks in advance for any help,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top