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!

Output to .pdf ...cancel error in runtime

Status
Not open for further replies.

maggieTan

Programmer
Sep 21, 2008
11
US
The following code
"
Private Sub Label466_Click()
DoCmd.OutputTo acForm, "QME Notification", acFormatPDF
End Sub
"
works fine in full version A2007, however in runtime, if the user cancels the output to .pdf dialogue, an Onclick error is presented. The app continues to run, but the user must click OK. Can someone help me with some error handling for this? Thanks!
 
I think i rember having this problem..???
In the Runtime you have to include the path and name of the output file name, in the docmd line. In the full version you get a prompt for the file name.
 
an Onclick error is presented
Can't your error handler trap it ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

I am pretty sure that all you have to do when using runtime is add the output file name...

DoCmd.OutputTo acForm, "QME Notification", acFormatPDF,"c:\test\Test.pdf",True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top