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

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