problem exporting a pdf from a form

janeyg

Registered User.
Local time
Today, 00:33
Joined
May 11, 2012
Messages
90
Hi
I have a code that has been successfully working, until today. I have a form which I then export as a pdf to a specific folder. I cannot understand why it has suddenly started to throw up the "runtime error 2501 outputto action was cancelled". The line is stops at is

DoCmd.OutputTo acOutputForm, "CLA Notice", acFormatPDF, varCombined

Can anyone advise why this may be happening?

Many thanks
Jane
 
Last edited:
This is my full code:-

Private Sub Command20_Click()
Dim varFilePath
Dim varFilename
Dim varCombined
varFilePath = "\\Southgate\learning$\Content Services\Bibs Services\Copyright
\Database\Cover Sheets\CLA\"
varFilename = Format(Now(), "dd-mmm-yyyy hh-nn") & " -- " & ID & " " &
ISBN_ISSN & ".pdf"
varCombined = varFilePath & varFilename
DoCmd.OutputTo acOutputForm, "CLA Notice", acFormatPDF, varCombined
MsgBox ("Export Complete To: " & varFilename)
End Sub

So what are you noting is wrong with it? Sorry, I don't see it.
 
I don't see it either, because you don't show what varCombined is.

You error can be caused by error in file name /path or lack of write permissions. Check both
 
Thanks so much - your right. I was so fixated on the varCombined. When I checked some had moved a folder.

thank you!
 

Users who are viewing this thread

Back
Top Bottom