Error 2501

Completely different filename out over at UA?

FWIW OrderNo contains a slash which is NOT allowed in a filename. :-(

From post #11
C:\Quotes\02262024- Order No -1/2024.pdf
Hi Gasman
Doug over at Utter Access highlighted the same issue as yourself.

How I didn't remember that no symbols in filenames is beyond me.

Many thanks
 
Consider the order of commands. Do you want to send filtered report? Do you want to save filtered report?

DoCmd.OpenReport
DoCmd.OutputTo
DoCmd.SendObject
 
Consider the order of commands. Do you want to send filtered report? Do you want to save filtered report?

DoCmd.OpenReport
DoCmd.OutputTo
DoCmd.SendObject
Hi June
The process now works after removing the Oblique Stroke from the Filename.

What I would like to happen is as follows:-

Opens Report in Print Preview for checking and Pause other actions for 10 seconds
Then displays EMail
Then makes a PDF copy of Report
 
Seems this simple code over on UA fixed the issue?? :unsure:

Code:
110            DoCmd.OutputTo acOutputReport, strDocName, acFormatPDF, "c:\Quotes\" & Me.OrderNo & "_" & strDocName & ".pdf"
 
Seems this simple code over on UA fixed the issue?? :unsure:

Code:
110            DoCmd.OutputTo acOutputReport, strDocName, acFormatPDF, "c:\Quotes\" & Me.OrderNo & "_" & strDocName & ".pdf"
Hi Gasman

Yes Doug spotted what you had.

Much appreciated.
 
Many thanks everyone as the main issue is now solved.

Does anyone know how to pause the Event after the Report is displayed in Print Preview so the user
can double check the values are correct?

Once a check has been made after approx 10 seconds then generate the Email and send the PDF to file.

Any help appreciated.
 

Users who are viewing this thread

Back
Top Bottom