integritycare
Technical User
Hi,
I need to put the date in the filename of an access report. I have tried this code as below. The report opens as a PDF OK, but no date.
Got some error here. Any bright suggestions would be appreciated.
Thank you..
I need to put the date in the filename of an access report. I have tried this code as below. The report opens as a PDF OK, but no date.
Got some error here. Any bright suggestions would be appreciated.
Code:
Private Sub Master_Report_Click()
Dim FilePath As String
Dim FileName As String
FilePath = "C:\Users\K\Desktop\Master Report PDF"
FileName = FilePath & Format(Date, "MM-DD-YYYY") & " Master Report"
DoCmd.OutputTo acOutputReport, "Master Report", acFormatPDF, strFullPath, True
End Sub