Search all Queries for a Field

jgabel

Registered User.
Local time
Yesterday, 21:48
Joined
Mar 29, 2012
Messages
42
I need to find out where the field called "R_SHIFT" is being referenced in all our MS Access queries. I just need the query name so I can go into the query and change the name from "R_SHIFT" to "SHIFT"

Thank you so much for any help you can offer. I'm posting this question in hopefully the right place as I was thinking there was a function for Modules to Find Field?

I have never done any Modules before.. :)
 

Attachments

  • Total Deep Search.png
    Total Deep Search.png
    25.8 KB · Views: 85
Very helpful information, worked great in my database I do not recommend having this done at the airport however.
 
but this sort of code will do it


Code:
Sub findtext()
Const ftext = "desired field name"
 
Dim qdef As QueryDef
For Each qdef In CurrentDb.QueryDefs
    If InStr(qdef.SQL, ftext) > 0 Then
        MsgBox ("String found in : " & qdef.Name)
    End If
Next
End Sub
 

Users who are viewing this thread

Back
Top Bottom