searching for text in query criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a handy way to search all queries in a database for the presence of
a particular text string in the criteria?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top