On Mon, 19 Jul 2004 18:18:21 GMT, fredg <fg******@example.invalid> wrote:
fredg,
Thanks for your help.
On my first attempt Access said it could not save the file. None of the
reasons were applicable. When the macro stopped it showed the date as:
mm/dd/yyyy. I think it was the slashes in a file name that was the problem.
I changed the *&Date()* to * & (Format(Date(),"yymmdd") and it is working fine.
I choose the date format so that the stored files would display sorted
chronologically.
Thanks again.
Chuck
....
On Mon, 19 Jul 2004 12:20:50 -0400, Chuck wrote:
Using a macro to output a query to an Excel file.
Is there a way to automatically add todays date in the file spec?
As: C:\Access Data\[filename] & todays date.xls
Chuck
...
Try these.
If [FileName] is a field in a table:
"c:\Access Data\" & [FileName] & Date() & ".xls"
If [FileName] is a generic text name:
"c:\Access Data\Expenses" & Date() & ".xls"