Daily Make Table Query

J

JD

I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?
 
X

XPS35

=?Utf-8?B?SkQ=?= said:
I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?

In VBA you can use a command like:
DoCmd.RunSQL "SELECT * INTO T" & Format(Date, "yyyymmdd") & " FROM T1"
 
P

PieterLinden via AccessMonster.com

JD said:
I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?

Just wondering, but is there a reason you can't just keep all the data in the
same table and index it so you can filter it easily? Whenever I see someone
asking about chunking data into lots of tables with the same structure, it
makes me leery...
 
Top