View Full Version : Search for all queries containing a specified field


Val
05-28-2002, 10:08 AM
Is there a way to get a list of all the queries that contain a certain field?

TIA
Val

pdx_man
05-28-2002, 01:53 PM
Public Sub Test_4_SQL()
Dim qdfLoop As QueryDef
Dim dbs As Database

Set dbs = CurrentDb

For Each qdfLoop In dbs.QueryDefs
If InStr(qdfLoop.SQL, "SearchStr") Then
MsgBox qdfLoop.NAME
End If
Next qdfLoop

End Sub


Put in what you want to search for in SearchStr

HTH

[This message has been edited by pdx_man (edited 05-28-2002).]