Finding which queries use specific control from the main form (2 Viewers)

ryetee

Registered User.
Local time
Today, 20:57
Joined
Jul 30, 2013
Messages
970
I am looking at an access database that uses to and from controls on the main form to control what is displayed in other forms and reports etc. I there an easy way to see which queries uses these controls as their criteria.
So I've created a query using the following criteria
>=[forms]![mainform![Fr_date] And <=([forms]![mainform]![To_date]+1)
I want to find any other query that has used Fr_date and To_date
Thanks.
 
The Object Dependencies feature under Database Tools will allow you to see which queries depend on your MainForm.
You can then view the SQL for each of those queries.

Or there are various database analyzer tools available (including my own) that can do that for you
 
thanks I'll take a look
 
You could also query the MSysQueries system table once you understand its structure.
 
In support of Colin's post #4, if you run this query...
SQL:
SELECT
    MSysObjects.Name,
    MSysQueries.*
FROM
    MSysObjects
    INNER JOIN MSysQueries ON MSysObjects.Id = MSysQueries.ObjectId;
...you can then run a Text Filter on the MSysQueries.Expression field, and the MSysObjects.Name column will identify the query it belongs to.
 

Users who are viewing this thread

  • Back
    Top Bottom