Determine where query used

Harry Shmedlap

Registered User.
Local time
Tomorrow, 01:55
Joined
Aug 9, 2005
Messages
51
How do I determine which forms, reports or other queries use a specific query in my entire database?
Thanks in advance.
 
You can use the documenter feature within Access which will give you that information, but possibly not in the most friendly or useful of formats.
 
I did that but I can't see on the report the other two queries that reference this one.
 
I did post a function some time ago: SearchInQueryDefs which shows you where a query or table was used. Should be here somewhere. And you can use control-F to search through the code. To search through code using a function is slightly more complicated.
I have made a start and will post it if you like. Only if you post the result.
 
I found SearchInQueryDefs. Its very good.

Only one problem: it seems to already exist in my database. I get the error:
Ambiguous name detected.

When I rename the function in VBA it works. How can I find where the twin is?
 
From the database window, open any module.

Click on the binoculars in the tool bar.

Type in: SearchInQueryDefs and check Current Database

Click Find Next repeatedly to show each instance.

HTH - Bob
 
How do I determine which forms, reports or other queries use a specific query in my entire database?
Thanks in advance.
The way I do it is, in the database window, locate the specific query you want, right click on it, and select OBJECT DEPENDENCIES.
That will locate every object in the database that uses that query.
 
I don't think that feature is available in Access 2002. It seems to have been added in 2003 and higher.
 

Users who are viewing this thread

Back
Top Bottom