Search for all queries containing a specified field

Val

Registered User.
Local time
Today, 15:45
Joined
Nov 5, 1999
Messages
30
Is there a way to get a list of all the queries that contain a certain field?

TIA
Val
 
Code:
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).]
 

Users who are viewing this thread

Back
Top Bottom