Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Dependencies - Table Names within Query Definition 1

Status
Not open for further replies.

TWillard

Programmer
Apr 26, 2001
263
US
I am working in an ms access environment with many tables and queries. It contains some linked tables and some access tables. The queries are built off of access tables, linked tables, and also other queries. I have vba code to loop through all query objects and display name, type, sql, etc. I am trying to determine table to query dependencies. Therefore, if I update or delete a table I will know which queries will be effected. Does any one have any ideas on how this may be achieved?
 
This may be a start:

Code:
SELECT DISTINCT MSysObjects.Name, 
     MSysObjects.Type, MSysObjects_1.Name
FROM MSysObjects, MSysQueries 
INNER JOIN MSysObjects AS MSysObjects_1 
    ON MSysQueries.ObjectId = MSysObjects_1.Id
WHERE InStr([Expression],[MSysObjects].[Name])>0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top