I am new to Access and I am generating forms that I would like to save as a PDF with a unique name such as 'March'_Report.PDF , 'April'_Report.PDF
Is it possible to do this using a macro or is VBA needed?
I am new to Access and I am generating forms that I would like to save as a PDF with a unique name such as 'March'_Report.PDF , 'April'_Report.PDF
Is it possible to do this using a macro or is VBA needed?
I don't use macros, but it may be possible. With VBA it would be simple to output with a given name. You'd use OutputTo and concatenate the fixed part(s) of the name with the variable part(s).
My main point for chiming in is that most of us would suggest printing/outputting a report, not a form. You have more control over formatting and such.
Would you be able to give me an example?
I apologize I may be getting my terminology confused. I am running a Report through the Form. Thank you very much for responding!
Here's one from an app I'm working on:
strMaster = "\\PathHere" & Me.txtDriverNum & "_" & Format(Me.txtDORDate, "yyyymmdd") & "_Master.pdf"
DoCmd.OutputTo acOutputReport, "rptMasterLeaseAgreement_Sig", acFormatPDF, strMaster
which would create a file like
\\ServerName\FolderName\12345_20190302_master.pdf
which was the format the boss wanted. strMaster is a variable declared as String.