Can output file name from access query-create table include date .

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

Guest

I am querying sales figures by territory and generating unique reports. A
series of macros are executed to run each query and develop an output table
(could be a report also). The output table is specified by name and path so
I can keep each territory report seperate. I currently have to manually
modify the output file name specified in the query parameters to include a
date so I can distinguish each report. I would like to be able to run the
macro without modifying the output file name. Is there a way to
automatically add a date to the output file name? I have seen back up
routines automatically append a date to the output file name and would like
to do the same.
 
Not sure how you're doing the filename, but you can use an expression
simliar to this in the File Name argument of the macro's action:

="C:\MyFolder\MyName" & Format(Date(), "ddmmyyyy") & "EndText.txt"

or modify your query to use a calculated expression similar to the above for
the file name field value.
 
Back
Top