To have month and year as part of the table name in CREATE TABLE or MAKE TABLE Query

I

ichew

I would like to have a CREATE TABLE or MAKE TABLE command that will
create a table name based on today's month and year. For example:
CREATE TABLE STAFF_LIST_APR06...

Can someone guide me in doing that, thanks.
 
J

John Vinson

I would like to have a CREATE TABLE or MAKE TABLE command that will
create a table name based on today's month and year. For example:
CREATE TABLE STAFF_LIST_APR06...

Can someone guide me in doing that, thanks.

It would be a VERY BAD IDEA to do so. Storing data in tablenames is
almost NEVER a good idea. If you want to see the staff list for April
2006, store a date field in the table and create a Query with criteria
on that date field! Could you explain how you will use these redundant
tables?

That said... if you have some good reason to do this, which I don't
understand... you must construct the MakeTable query's SQL string in
VBA code. You cannot do it in the query designer.

John W. Vinson[MVP]
 

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