reportname? Adding Date and report Field (ordernumber)?

B

Brook

Is it possilbe to add the current date and a field from my report to my
report name, so that when I save it to my C:\ drive, I don't have to do any
additional name changes?

Thanks,

Brook
 
J

jl5000

Try something like this:

DoCmd.OutputTo acOutputQuery, _
"MyReport", _
acFormatXLS, _
"MyReport_" & Format(Date, "mm-dd-yyyy") & ".xls"

or

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, _
"MyTableOrQuery", _
"FileName_" & Format(Date, "mm-dd-yyyy") & ".xls"
 
Top