Having read posts including those by "GemmaTheHusky" about this issue and followed the advice given I am still stuck.
"Enthusiastic beginner" with Access 2010 on Win7u.
Have been using this line behind command button with complete success between Dec'15 and Aug'16
Report opens and PDF is saved (always successful).
The concatenated filename "FileNamePartTwo" has no spaces and no special characters and has always been 7 text characters from text fields.
Recently just get the report to open (correct display without errors) but every use of the command button to instigate the above line fails with error 2501 and the above line highlited.
Have tried -
Removing underscores from the concatenated filename, replacing with hyphen, removing that to no character, removing first part (B24crews) - all without success.
Have returned to older backups including those prior to the date of full function.
All now fail with error 2501 - having previosly worked correctly.
There is no preexisting version of the desired filename in the destination folder (previous versions moved out).
BUT - by right click on open report I can go to Print Preview then save as PDF and get a correct copy as PDF.
"Enthusiastic beginner" with Access 2010 on Win7u.
Have been using this line behind command button with complete success between Dec'15 and Aug'16
Code:
DoCmd.OutputTo acOutputReport, "rpt_liberatorbycrew", acFormatPDF, "B24crew_" & FileNamePartTwo & ".pdf", False
The concatenated filename "FileNamePartTwo" has no spaces and no special characters and has always been 7 text characters from text fields.
Recently just get the report to open (correct display without errors) but every use of the command button to instigate the above line fails with error 2501 and the above line highlited.
Have tried -
Removing underscores from the concatenated filename, replacing with hyphen, removing that to no character, removing first part (B24crews) - all without success.
Have returned to older backups including those prior to the date of full function.
All now fail with error 2501 - having previosly worked correctly.
There is no preexisting version of the desired filename in the destination folder (previous versions moved out).
BUT - by right click on open report I can go to Print Preview then save as PDF and get a correct copy as PDF.