I'm attempting to search through all of the macros in a db to find if a certain query is referenced within it. For example, I want to see if the query named "qryThisIsMyQuery" is run from any of the several macros found in the database. This will be used in different databases - so the list of macros is changeable and the name of the query I'll be searching for will change also.
I can iterate throught the application.allmacros collection - but I'm stuck on how to take it further...
Any help would be greatly appreciated!
Here's what I have so far...
Public Sub test()
Dim obj As AccessObject
Dim dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllMacros
Debug.Print obj.Name
Next
End Sub
Thanks in advance!
I can iterate throught the application.allmacros collection - but I'm stuck on how to take it further...
Any help would be greatly appreciated!
Here's what I have so far...
Public Sub test()
Dim obj As AccessObject
Dim dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllMacros
Debug.Print obj.Name
Next
End Sub
Thanks in advance!