S
SteveB
Hi All
Access Version: 2007
I have a form which, through a number of command buttons, exports various
reports in pdf format. What I would like to do is prefix an exported report
with the date in YYYYMMDD format. As an example, the report in the code
below would be "20080822 Outstanding Requests.pdf". The other report I have
problems with the naming is how to put in the date and the record number
which is in field "Request_No" on the form it is generated from.
The code I have at the moment for one of the reports is;
Dim stDocName As String
stDocName = "rpt_notComplete"
DoCmd.OpenReport stDocName, acPreview, , , acHidden
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, "Outstanding
Requests.pdf", True
As ever, any help or guidance would be gratefully received.
Regards
Steve
The code I have at the moment for one of the reports is;
Dim stDocName As String
stDocName = "rpt_notComplete"
DoCmd.OpenReport stDocName, acPreview, , , acHidden
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, "Outstanding
Requests.pdf", True
Access Version: 2007
I have a form which, through a number of command buttons, exports various
reports in pdf format. What I would like to do is prefix an exported report
with the date in YYYYMMDD format. As an example, the report in the code
below would be "20080822 Outstanding Requests.pdf". The other report I have
problems with the naming is how to put in the date and the record number
which is in field "Request_No" on the form it is generated from.
The code I have at the moment for one of the reports is;
Dim stDocName As String
stDocName = "rpt_notComplete"
DoCmd.OpenReport stDocName, acPreview, , , acHidden
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, "Outstanding
Requests.pdf", True
As ever, any help or guidance would be gratefully received.
Regards
Steve
The code I have at the moment for one of the reports is;
Dim stDocName As String
stDocName = "rpt_notComplete"
DoCmd.OpenReport stDocName, acPreview, , , acHidden
DoCmd.OutputTo acOutputReport, stDocName, acFormatPDF, "Outstanding
Requests.pdf", True