kengooch
Member
- Local time
- Today, 03:32
- Joined
- Feb 29, 2012
- Messages
- 137
I would like to save an Access report to disk, but each user may save their files in a different folder, so though I create a default name for the file, I would like to open the windows standard SaveAs file dialogue window, paste the created file name as the default and then wait for the user to accept or modify the file or navigate to a different folder.
I've tried various options, here is my last attempt:
Thanks in advance!
Ken
I've tried various options, here is my last attempt:
SQL:
Private Sub bSavePDF_Click()
'This Code Saves the file to a PDF
'Set the Default Path and Name
vPath = "L:\KDG-MPA\CAP\"
vFileNm = Format(CDate(Date), "yyyy-mm-dd") & tPSKey & " - " & " Proficeincy Survey Review.pdf"
'Open the Windows File SaveAs Dialogue
Application.Dialogs(xlDialogSaveAs).Show vPath & vFileNm
' Reassing vPath and vFileNm to user selection
'Save the Report
DoCmd.OutputTo acOutputReport, "rPSRSurvey", acFormatPDF, tPath & tReportNm, True
End Sub
Thanks in advance!
Ken