I have recently started getting the "output to action was cancelled" error frequently, but not consistently with my code.
The module generates Access reports as a pdf file in dropbox. I've used the exact same module for a couple of years and have never gotten this error, now I get it several times per day. The odd thing is that I can run the same module multiple
times and it will work sometimes and not others.
A sample of the code is below
' Elder Care
If Dir(DROPBOXPATH & "schedules\elder.pdf") <> "" Then
Kill DROPBOXPATH & "schedules\elder.pdf"
End If
DoCmd.OutputTo acOutputReport, "Fax Schedule - 2018 - Elder", "PDFFormat(*.pdf)", DROPBOXPATH & "Schedules\elder.pdf", False, "", 0, acExportQualityPrint
' Community
If Dir(DROPBOXPATH & "schedules\community.pdf") <> "" Then
Kill DROPBOXPATH & "schedules\community.pdf"
End If
DoCmd.OutputTo acOutputReport, "Fax Schedule - 2018 - Community", "PDFFormat(*.pdf)", DROPBOXPATH & "Schedules\community.pdf", False, "", 0, acExportQualityPrint
I added the code to check for the file and delete it if it exists in case there was an issue with it overwriting the existing file, but that didn't solve the problem. Any other ideas?