Find Field Listed in Queries and List Them

jgabel

Registered User.
Local time
Today, 15:36
Joined
Mar 29, 2012
Messages
42
I have no experience with Access Modules which I think I need to find all the queries that reference a field, in this example:
LAWSON_LHSEMPDEMO.R_STATUS

I would like for the module to list all the queries for me that reference this table and field of "LAWSON_LHSEMPDEMO.R_STATUS"

Is there an easy way to do this? Please help

Thank you kindly
 
It could be done with code, but you might Google a free utility called V-Tools, which has a deep search tool.
 
Thanks, I'm a little leary of installing software, I need to apply these updates to different PC's and different dbases, sounds like I would have to install the V-tools on each.

I was hoping this was an easy request, but it sounds more complicated.

I think I have something close with this, but it's not working quite right, any help is much appreciated;

Dim qdfLoop As QueryDef
Dim dbs As Database

Set dbs = CurrentDb

For Each qdfLoop In dbs.QueryDefs
If InStr(qdfLoop.SQL, "LAWSON_LHSEMPDEMO.R_STATUS") Then
MsgBox qdfLoop.Name
End If
Next qdfLoop

End SubEnd Sub
 
What does "not working quite right" mean exactly?
 
I have this working now, see below...

Sub starter()
Dim qdfLoop As QueryDef
Dim dbs As Database
Set dbs = CurrentDb

For Each qdfLoop In dbs.QueryDefs
If InStr(qdfLoop.SQL, "LAWSON_LHSEMPDEMO.R_STATUS") Then
MsgBox qdfLoop.Name
End If
Next qdfLoop
End Sub
 

Users who are viewing this thread

Back
Top Bottom