date name as excel export

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

Guest

to make the question clear:
I want it to be part of the excel name when it exports this as an excel
spreadsheet to the folder on our server.
example: 20050430_incidenttable.xls

Klatuu" wrote:

Your question is unclear, where do you want the date to show up?

Pam Coleman said:
I have an Access query that has a criteria that will ask for a specific date,
then pull out the data and create a make table. Question: I have a macro
that runs that query, asks for the date, and then creates the table. I then
export this into an excel spreadsheet and saves it to a server. I want it
to
export it with the date that I put in the criteria, but it only gives it the
table name. Is there a way to do this? I know I can run my query with
date() and it will export and name the spreadsheet with the date it was run,
but this is not what I want. Thanks,
 
Pam,

Try this in the file name argument:

="C:\SomeFolder\" & Format(Date(), "yyyymmdd") & "_incidenttable.xls"

HTH,
Nikos
 
Back
Top