Search for all queries containing a specified field (1 Viewer)

Val

Registered User.
Local time
Today, 03:17
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
 

pdx_man

Just trying to help
Local time
Today, 00:17
Joined
Jan 23, 2001
Messages
1,347
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

Top Bottom