Search for use of Column

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

Guest

Try to find if there is a way to search all Queires for the use of a column
for a particular table. I have a db that contains 50+ queries and wish to
find out if a particular column of a table is used in any of those queries.

Thanks for any and all input
 
Public Sub ListQueries(ByVal ColumnName As String)

Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb
For Each qdf In db.QueryDefs
If InStr(1, qdf.SQL, ColumnName) > 0 Then
Debug.Print qdf.Name
End If
Next qdf

End Sub

Pass the name of the column you're looking for as the ColumnName argument,
e.g. ...

ListQueries "OrderID"
 
Try to find if there is a way to search all Queires for the use of a column
for a particular table. I have a db that contains 50+ queries and wish to
find out if a particular column of a table is used in any of those queries.

Thanks for any and all input

There are some third-party tools that help with this:

Free:
http://www3.bc.sympatico.ca/starthere/findandreplace
Find and Replace: http://www.rickworld.com
Speed Ferret: http://www.moshannon.com
Total Access Analyzer: http://www.fmsinc.com


John W. Vinson[MVP]
 

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