Eric the Viking
Registered User.
- Local time
- Today, 00:48
- Joined
- Sep 20, 2012
- Messages
- 70
Dear All
Happy New Year
I am trying to find a way to use VBA to name and export a report.
I have a continuous form displaying records with a button to generate the report when I need to.
I am using the following VBA for the onclick event of the button to open the report:
DoCmd.OpenReport "rptMembersLedgerDebitsAndReceiptsTEMP", , , "Surname='" & Me.Surname & "'AND FirstName='" & Me.FirstName & "'"
I can then name and save this as a pdf but it's a bit tedious and I would prefer the report to save to a folder with the days date date, surname and first name as the file name.
I would appreciate some guidance please.
All the best Eric
Happy New Year
I am trying to find a way to use VBA to name and export a report.
I have a continuous form displaying records with a button to generate the report when I need to.
I am using the following VBA for the onclick event of the button to open the report:
DoCmd.OpenReport "rptMembersLedgerDebitsAndReceiptsTEMP", , , "Surname='" & Me.Surname & "'AND FirstName='" & Me.FirstName & "'"
I can then name and save this as a pdf but it's a bit tedious and I would prefer the report to save to a folder with the days date date, surname and first name as the file name.
I would appreciate some guidance please.
All the best Eric