-----Original Message-----
How can one combine the existing tables automatically into
a single table as opposed to hard-wiring the table names
into a "UNION" SQL Query.
One doesn't.
One keeps all like things in one table; and if they are not alike then they
can't be stuck together with a UNION query anyway. There is simply no
excuse for not knowing in advance [1] the names of the tables in a
database. The schema design is the very first thing that gets laid down,
and anything that changes that will spread earthquakes and tsunamis all
round the user interface.
This kind of question is nearly always the result of storing data in table
names. Bad.
Best wishes
Tim F
[1] Oh all right: there are occasional temporary tables that are created
and dropped for special purposes, but they are pretty uncommon and are not
likely to be involved in a query like
For Each tdf in TableDefs
AddToQuery(tdf.Name)
Next tdf
which is what I guess is happening here.
.