reportname? Adding Date and report Field (ordernumber)?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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"
 
Back
Top