T
tina
hi folks.
i'm using the system tables MSysObjects and MSysQueries to do the following:
1. use a SQL statement to select the object names of all Action queries,
open a DAO.Recordset, loop through the records, and append them into a table
called tblQueries.
2. use a SQL statement to select the object names, and Type, of all Action
queries, and the "new table name" in make-table queries, and update the
corresponding records in tblQueries.
3. use a SQL statement to identify query names in tblQueries that don't
match a query name in MSysObjects, and delete the unmatched records *FROM
tblQueries*.
4. use a SQL statement to identify report names in tblReports that don't
match a report name in MSysObjects, and delete the unmatched records *FROM
tblReports*.
at no time am i editing MSysObjects or MSysQueries in any way. and i'm
running all the SQL from VBA directly, not from permanent query objects in
the database window, so as not to expose the system tables directly to the
user. the View, HiddenObjects option remains at the default setting in the
database.
my question is: are there pitfalls or drawbacks to using the data in the
system tables, that i should watch out for? any inconsistency in Type,
Flags, or Attribute values that could skew my results, for instance?
i'd appreciate any advice, suggestions, or warnings - MVPs, especially,
please pull me back in line if i'm straying from the "true path". <g>
thx
tina
i'm using the system tables MSysObjects and MSysQueries to do the following:
1. use a SQL statement to select the object names of all Action queries,
open a DAO.Recordset, loop through the records, and append them into a table
called tblQueries.
2. use a SQL statement to select the object names, and Type, of all Action
queries, and the "new table name" in make-table queries, and update the
corresponding records in tblQueries.
3. use a SQL statement to identify query names in tblQueries that don't
match a query name in MSysObjects, and delete the unmatched records *FROM
tblQueries*.
4. use a SQL statement to identify report names in tblReports that don't
match a report name in MSysObjects, and delete the unmatched records *FROM
tblReports*.
at no time am i editing MSysObjects or MSysQueries in any way. and i'm
running all the SQL from VBA directly, not from permanent query objects in
the database window, so as not to expose the system tables directly to the
user. the View, HiddenObjects option remains at the default setting in the
database.
my question is: are there pitfalls or drawbacks to using the data in the
system tables, that i should watch out for? any inconsistency in Type,
Flags, or Attribute values that could skew my results, for instance?
i'd appreciate any advice, suggestions, or warnings - MVPs, especially,
please pull me back in line if i'm straying from the "true path". <g>
thx
tina