Error 2501 (1 Viewer)

mike60smart

Registered User.
Local time
Today, 17:49
Joined
Aug 6, 2017
Messages
1,917
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
 

June7

AWF VIP
Local time
Today, 08:49
Joined
Mar 9, 2014
Messages
5,497
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
 

mike60smart

Registered User.
Local time
Today, 17:49
Joined
Aug 6, 2017
Messages
1,917
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
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:49
Joined
Sep 21, 2011
Messages
14,470
Seems this simple code over on UA fixed the issue?? :unsure:

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

mike60smart

Registered User.
Local time
Today, 17:49
Joined
Aug 6, 2017
Messages
1,917
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.
 

mike60smart

Registered User.
Local time
Today, 17:49
Joined
Aug 6, 2017
Messages
1,917
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.
 

mike60smart

Registered User.
Local time
Today, 17:49
Joined
Aug 6, 2017
Messages
1,917

Users who are viewing this thread

Top Bottom