Function QuerySearch(SearchString As String) Dim db As DAO.Database Dim qd As QueryDef Set db = Application.CurrentDb For Each qd In db.QueryDefs SQL = qd.SQL If InStr(1, SQL, SearchString) Then Debug.Print SearchString & " used in query - " & qd.Name End If Next End Function |