Hi
This may help someone looking to open a report in PDF format and save to file, with your own choice of file name.
txtPDFRef is a field that contains the filename you want, in my example it is =Format(Date(),"yyyymmdd") & " - " & "Statement " & [txtClient]
Private Sub cmdPDFInv_Click()
DoCmd.OutputTo acOutputReport, "YOUR REPORT", acFormatPDF, "C:\Users\Fiona\Desktop\PDFs\Statements\ " & Me.txtPDFRef & ".pdf", True
End Sub
Fi
This may help someone looking to open a report in PDF format and save to file, with your own choice of file name.
txtPDFRef is a field that contains the filename you want, in my example it is =Format(Date(),"yyyymmdd") & " - " & "Statement " & [txtClient]
Private Sub cmdPDFInv_Click()
DoCmd.OutputTo acOutputReport, "YOUR REPORT", acFormatPDF, "C:\Users\Fiona\Desktop\PDFs\Statements\ " & Me.txtPDFRef & ".pdf", True
End Sub
Fi