Currently I am using the following code to check and see if a file with the same name exists. If so, delete the file and replace with a new file.
What I would like to do is check to see if the file exists, if so, then generate a message that says something like, "file already exists, would you like to save it with a different file name?" If the user says 'yes' then I would like to generate a 'save as' dialogue box OR a input box to alow the user to save the file name differently.
How would I code this?
If Dir(TheFile) <> "" Then
TheFile = CurrentProject.Path & "\TripReport-" & strPlace & "-" & strUserName & "-" & TheDate & ".rtf"
DoCmd.OutputTo acReport, "rptTrip", "RichTextFormat(*.rtf)", TheFile, , , acExportQualityScreen