finding tables assoicated to queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have hundreds of queries getting records from 20 different tablles. Now I
have to change one of those tables and need to know if there is an easy way
to find out which queries use which tables without have to go through each
query and mapping each one. The reason I need to know this is in Acess when
you make changes to a Table strange thing happens in the queries.
 
Use TOOLS - Analyze - Documentor. Select all the queries and SQL in the
options. Run and save to Word. Search in Word to find all.
 
haggr said:
I have hundreds of queries getting records from 20 different tablles. Now I
have to change one of those tables and need to know if there is an easy way
to find out which queries use which tables without have to go through each
query and mapping each one. The reason I need to know this is in Acess when
you make changes to a Table strange thing happens in the queries.


See if this kind of procedure (air code) makes your job a
little easier.

Public Sub FindQueries(strTblName As String)
Dim db As Database
Dim qdf As QueryDef

Set db = CurrentDb()
For Each qdf In db.QueryDefs
If qdf.SQL Like "*" & TblName & "*"
Debug.Print qdf.Name
End If
Next qdf

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top