Hi,
What is the use of such a table... what will be the SQL statement that
will interact with a table name you don't know in advance, except if you
build the text of the SQL statement at run time?
You can always built the SQL statement (string) that creates the table,
inserting the VBA generated random name, but is that really a useful design?
why not adding an extra column to ONE GIVEN table, instead?
MyBigTable 'table name
MyData1, MyData2, MyData3, WouldBeTableName ' fields
Then,
SELECT *
FROM MyBigTable
WHERE WouldBeTableName= "qwerty"
is logically the same as your initially planned
SELECT *
FROM qwerty
except that this last statement impossible to "save" since you do not know
the name qwerty, but the previous one, just change the constant for a
parameter and you have your saved query. Further more, the large table makes
"inter initial-tables check" very easy, while you need much more experience
to write a general query involving multiple tables (with an unknown name).
And finally, the large table is closer to what SQL expect to operates on,
so, it untimely provides you with an easier work, for the future, to work
with the flow, than alone, or against the current flow.
Hoping it may help,
Vanderghast, Access MVP