Marco Outputto to Excel - Object- Report

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

Guest

Di
I am exporting from access macro to excel file in my desired location, but
in need to add field name (from the report [reportdate] after the file name.

Present output to excel as : D\MMCOF.XLS
Required output as: D\MMCOF_311005_.XLS

Date is available in the access report under field =reportdate

Thanks in advance
 
Ron,

You can't reference a field value from the Report itself, but you could
reference it from the Query that the report is based on. Something like
this...
="D:\MMCOF_" & Format(DLookup("[ReportDate]","YourQuery"),"ddmmyy") &
"_.xls"
 
Thanks Steve , you saved my day, Excellent expression.
One more if you need the to replace the current date(today), how can i do
that.

Thanks
--
Ron


Steve Schapel said:
Ron,

You can't reference a field value from the Report itself, but you could
reference it from the Query that the report is based on. Something like
this...
="D:\MMCOF_" & Format(DLookup("[ReportDate]","YourQuery"),"ddmmyy") &
"_.xls"

--
Steve Schapel, Microsoft Access MVP

Di
I am exporting from access macro to excel file in my desired location, but
in need to add field name (from the report [reportdate] after the file name.

Present output to excel as : D\MMCOF.XLS
Required output as: D\MMCOF_311005_.XLS

Date is available in the access report under field =reportdate

Thanks in advance
 
Back
Top