PDF Complete (2 Viewers)

crich21

Registered User.
Local time
Today, 07:05
Joined
Jan 10, 2003
Messages
95
I have used this line of code for several years to output PDF reports.
I output multilple reports with this same method and it works on all but 1 PC.
I have one pc that has the PDF Complete app installed as there primary pdf viewer.
This is the only PC where this code fails. Has anyone experienced this? Workaround?

Code:
DoCmd.OutputTo acOutputReport, "rptFinishedGoods", acFormatPDF, strServerFileShareDir & "All-FG not Shipped.pdf", False

Error 2501
 
And 2501 is? :(
What does strServerFileShareDir contain?

Edit: I think Access uses it's own engine for creating the pdf?
 
Last edited:
Error code 2501 is "Action canceled" (which could also be more specific as to the action that was canceled.)

Since that machine has a different PDF processing utility it is reasonable to assume that the particular utility is not compatible with Access. You di8dn't say which version of Windows is in play here, but you can do this:

One any PC that is working and on the one that is failing, do the left-click on the Start Button and get to Settings >> Apps >> Default Apps. Look in the list of file types and their default app for the file type .PDF to see if the two machines are different in that particular setting.
 
I get
Code:
? error(2501)
Application-defined or object-defined error
 
Which version of Access is on the PC that is failing? Just wondering...

PS. If you use the following code, do you still get the same error?
Code:
DoCmd.OutputTo acOutputReport, "rptFinishedGoods", acFormatHTML, strServerFileShareDir & "All-FG not Shipped.html", True
 
Last edited:

Users who are viewing this thread

Back
Top Bottom