Using a report field to create export file name

Spence

Trying to make it work
Local time
Today, 09:32
Joined
Nov 14, 2008
Messages
17
Hello All:

I have a command button that prints a report to a pdf file. rather than having to rename the file each time, I want to pickup a field from the report and have it used as the file name. Is this possible?

Yes...I am a novice.
 
You could open the report as hidden, get the value, then output the report.
But if the field is in the detail section, how would you determine which record? Unless this is a one record report

DoCmd.OpenReport "rptTest", acViewPreview, , , acHidden
MsgBox Reports![rptTest]![CA_EventDT]
 
Vonnie:
If you open the table instead, you can use the gotorecord method with the docmd object
 

Users who are viewing this thread

Back
Top Bottom