Finding all queries that use a particular table

  • Thread starter Thread starter mbh
  • Start date Start date
M

mbh

Hi--I have a table that is used in hundreds of queries in my database. When
I run documenter for the table, I don't see these relationships. How can I
identify where this table is used in multiple queries?

Thanks
 
If you are running A2003, you can right click on the table and choose the
Object Dependencies item. This feature needs to turn on the Name Auto
Correct feature to work but you can turn off Name Auto Correct again when
you are done.
 
I've been using Speed Ferret for about 5 years. Although they still don't
have a version that works exclusively with Office 2003, if you have Office
2000 or XP, you can uninstall 2003, install the earlier version, and then do
a "custom" reinstall of 2003, overwriting everything but the earlier version
of Access. This will give you Access 2003 and the ability to use Speed
Ferret. They indicate that they are working on a new version, but have been
saying that for 3 years.

It is an Search and Replace tool for Access and SQL Server that works great.
If you have hundreds of queries, and need to make changes to a field name,
table name, or some other object in your database. This will pay for itself
the first time you use it.

Dale
 
When I right click on the table from the Database window, I do not get an
option for Object Dependencies. Any suggestions?
 
Here's the code I use to find which queries use a particular column in all
queries. Looking at it, it just looks for a piece of text occuring in the
sql, so it would find tables as well.
Paul Shapiro

Dim qdf As DAO.QueryDef
Dim strOut As String

strOut = "Searching for the string: " & strFieldname

'Search the querydefs
strOut = strOut & vbCrLf & "Used in Queries: "
For Each qdf In CurrentDb.QueryDefs
If InStr(qdf.SQL, strFieldname) Then
strOut = strOut & vbCrLf & " " & qdf.Name
End If
Next
 
Back
Top