Is there a way to see where a table\field name is used in a query?

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a number of queries and i am updating tables. Is there a tool that
allows me to see where a table and it's filed nmae is used inside access?

Thanks
 
Out at my site I've got an addin tool that includes code to analyze
queries for little things like you describe. Download the DataFast
utility and add it to your addins

http://amazecreations.com/datafast/

Alternatively, you can do some simple DAO code, like this ...


Function FindTable(ByVal strTable As String) As String

Dim dbs As Dao.Database
Dim qdf As Dao.QueryDef
Dim strOut as string

Set dbs = currentdb()
For Each qdf in dbs.Querydefs
If InStr(1,qdf.SQL, strTable) > 0 Then strOut = strOut & qdf.Name & ";"
Next
Set dbs = nothing
FindTable = strOut
End Function
 
Thank you both - this is a start!

Dave

Danny J. Lesandrini said:
Out at my site I've got an addin tool that includes code to analyze
queries for little things like you describe. Download the DataFast
utility and add it to your addins

http://amazecreations.com/datafast/

Alternatively, you can do some simple DAO code, like this ...


Function FindTable(ByVal strTable As String) As String

Dim dbs As Dao.Database
Dim qdf As Dao.QueryDef
Dim strOut as string

Set dbs = currentdb()
For Each qdf in dbs.Querydefs
If InStr(1,qdf.SQL, strTable) > 0 Then strOut = strOut & qdf.Name & ";"
Next
Set dbs = nothing
FindTable = strOut
End Function

--

Danny J. Lesandrini
(e-mail address removed)
http://amazecreations.com/datafast
 

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