Conundrum

TheSearcher

Registered User.
Local time
Today, 06:53
Joined
Jul 21, 2011
Messages
390
I have code that exports an Access report to a pdf on our network.
The pdf is called MyFile.pdf.
If the user goes back into the interface and changes some data, and then re-exports the report, I want to keep the original report and export the modified report with a modified name such as MyFile_2.pdf.
I have accomplished this by checking to see if MyFile.pdf exists. If it exists then I concatenate “_2” to its name before exporting it.
So far, so good. I now have 2 files: MyFile.pdf and MyFile_2.pdf.

However, if the user modifies it a third time, I have no way of anticipating what file name to search for on the network. It can be MyFile_2 or MyFile_3 or MyFile_7…..

Does anyone have any suggestions on how I can solve this conundrum?

Thanks in advance,
TS
 

Users who are viewing this thread

Back
Top Bottom