Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
Public Sub ExamineAllQueries() Const lookFor As String = "product" Dim imin As Long Dim imax As Long Dim i As Long Dim sSql As String Dim lookForUpper As String With DBEngine.Workspaces(0).Databases(0) imin = 0 imax = .QueryDefs.Count - 1 + imin lookForUpper = UCase$(lookFor) Debug.Print "=====================================================================" Debug.Print " The SQL for the following queries contain '" & lookFor & "'" Debug.Print "---------------------------------------------------------------------" For i = imin To imax sSql = UCase$(.QueryDefs(i).SQL) If sSql Like "*" & lookForUpper & "*" Then Debug.Print .QueryDefs(i).name End If Next End With End Sub
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.