View Single Post
  #2  
Old May 7th, 2010, 12:55 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Finding a function call in queries

On Thu, 6 May 2010 15:57:01 -0700, cherman
wrote:

Does anyone know of a way to find if a function is being called from a query?
Another words, I have a function that might be called from 1 or more queries
in my DB and I am looking for a quick way to see which queries it is called
from.

With over 200 queries in my DB, it will take me some time to check them
manually, and I have 2 functions to check.

Is there a utility or something that will do this for me?

Thanks!


There are a few third party utilities that will do this:

Free: http://www3.bc.sympatico.ca/starthere/findandreplace
Find and Replace: http://www.rickworld.com
Speed Ferret: http://www.moshannon.com
Total Access Analyzer: http://www.fmsinc.com

Some of these links are rather old and may not be current.

You could also use VBA to loop through the QueryDefs collection and search for
the function name in the SQL property:

Dim qd As DAO.Querydef
For Each qd IN CurrentDb.Querydefs
If InStr("MyFunction", qd.Sql) 0 Then
Debug.Print qd.Name
End If
End Sub

Untested air code!
--

John W. Vinson [MVP]