By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,573 Members | 3,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,573 IT Pros & Developers. It's quick & easy.

Finding queries with certain criteria

P: 8
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
Apr 17 '08 #1
Share this Question
Share on Google+
2 Replies


FishVal
Expert 2.5K+
P: 2,653
Hi, Dave.

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

Regards,
Fish
Apr 17 '08 #2

P: 8
Thanks.
For those interested, I found a neat little utility form for this. See http://www.heuveltop.nl/BasCB/samples/navqueries.zip available from http://www.heuveltop.nl/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! :-)
Apr 17 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.