I would like to check my db for unused queries. I made a lot of queries and I know some are just hanging out there being of no use at all.
I found online a VBA program that might help:
Code:
Public Sub CheckQueries(ByVal str as String)
Dim qu As QueryDef
For Each qu In CurrentDb.QueryDefs
If InStr(qu.SQL, str) > 0 Then
Debug.Print qu.Name
End If
Next
End Sub
The question is will this code work. If it will work, then where do I place it in the already existing db?
Any help appreciated. Thanks in advance.
Respectfully,
Lou Reed