searching for text in query criteria

A

AccessMan

Is there a handy way to search all queries in a database for the presence of
a particular text string in the criteria?
 
M

Marshall Barton

AccessMan said:
Is there a handy way to search all queries in a database for the presence of
a particular text string in the criteria?


You can easily search all the **saved** queries with
something like:

Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb()
For Each qdf In db.QueryDefs
If qdf.SQL Like "*WHERE *XYZ*" Then
Debug.Print qdf.Name, qdf.SQL
End If
Next qdf
Set db = Nothing
 
Top