S
sparlaman
Scenario: A vendor has setup an access database as a holding place for
individual tables with one or two records of common data instead of one table
with many records. Each day (sometimes more than once a day) a new table is
added to this database with a new name. For obvious reasons my options for
retrieving data are limited.
Question: Is there some way to include the table name in a query
automatically?
Obsticles I'm encountering: I can't manually type the table name into an
'expression' field within the query because the name changes.
I have learned that I can query MSysobjects to retreive the names and other
data about every table in the database but what I can't figure out is how to
use that information and/or relate back to the query to include the table
name in the query.
Example: table1 contains field1, field2, field3, etc... I want Query1 to
include table1.field1, table1.field2, table1.field3, AND Table1's table name
I hope this makes sense. Thanks for everyone's help in advance.
sparlaman
individual tables with one or two records of common data instead of one table
with many records. Each day (sometimes more than once a day) a new table is
added to this database with a new name. For obvious reasons my options for
retrieving data are limited.
Question: Is there some way to include the table name in a query
automatically?
Obsticles I'm encountering: I can't manually type the table name into an
'expression' field within the query because the name changes.
I have learned that I can query MSysobjects to retreive the names and other
data about every table in the database but what I can't figure out is how to
use that information and/or relate back to the query to include the table
name in the query.
Example: table1 contains field1, field2, field3, etc... I want Query1 to
include table1.field1, table1.field2, table1.field3, AND Table1's table name
I hope this makes sense. Thanks for everyone's help in advance.
sparlaman