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"
 

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