Finding queries with certain criteria

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DancingDave
    New Member
    • Apr 2008
    • 8

    Finding queries with certain criteria

    Hi,

    I need to locate all the queries in my .mdb that have a certain string in the criteria field. Is there some kind of search mechanism or 3rd party tool that can look through my queries for me and list the ones that contain the string?

    Thanks,
    Dave
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, Dave.

    This may be done quite easily with a simple VBA code iterating through CurrentDb.Query Defs collection. In each iteration query's SQL string is obtained with QueryDef.SQL property and checked with InStr() function for criteria substring.

    Regards,
    Fish

    Comment

    • DancingDave
      New Member
      • Apr 2008
      • 8

      #3
      Thanks.
      For those interested, I found a neat little utility form for this. See http://www.heuveltop.n l/BasCB/samples/navqueries.zip available from http://www.heuveltop.n l/BasCB/msac_index.html

      Single quote in query names cause the Find routine to silently stop prematurely, but otherwise this little form is a real gem! :-)

      Comment

      Working...