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

J

JCoff

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.
 
K

Ken Snell \(MVP\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top