dbTalk Databases Forums  

Scan all queries for specific criteria text

comp.databases.ms-access comp.databases.ms-access


Discuss Scan all queries for specific criteria text in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BobAlston
 
Posts: n/a

Default Scan all queries for specific criteria text - 04-15-2011 , 11:24 AM






I need to scan all of my queries to look for a specific criteria text.
Any query with this criteria text I need to look at further and probably
modify.

Any straight forward way to do this?

thanks

bob

Reply With Quote
  #2  
Old   
bobh
 
Posts: n/a

Default Re: Scan all queries for specific criteria text - 04-15-2011 , 11:49 AM






On Apr 15, 12:24*pm, BobAlston <bobalst... (AT) yahoo (DOT) com> wrote:
Quote:
I need to scan all of my queries to look for a specific criteria text.
Any query with this criteria text I need to look at further and probably
modify.

Any straight forward way to do this?

thanks

bob
There may be other ways directly within Access but I use a third party
product called Find&Replace
bobh.

Reply With Quote
  #3  
Old   
Bob Barrows
 
Posts: n/a

Default Re: Scan all queries for specific criteria text - 04-15-2011 , 11:52 AM



BobAlston wrote:
Quote:
I need to scan all of my queries to look for a specific criteria text.
Any query with this criteria text I need to look at further and
probably modify.

Any straight forward way to do this?

You could use VBA to loop through the Querydefs collection, searching each
querydef's SQL property for the string you are interested in, either using
InStr or a regular expression, and if found, either modify the SQL property
in the loop, or, if the numer of queries containing this string is small,
use DoCmd.OpenQuery to open the query in design view. With a large number of
queries, you probably don't want them all open at once, so you will probably
want to write the querydef names to the debug window so you can process them
at your leisure. Another benefit to this alternative is it reduces the
danger of false positives.

Another alternative that might do what you want is this tool:
http://www.rickworld.com/products.html

Reply With Quote
  #4  
Old   
BobAlston
 
Posts: n/a

Default Re: Scan all queries for specific criteria text - 04-15-2011 , 01:02 PM



On 4/15/2011 11:49 AM, bobh wrote:
Quote:
On Apr 15, 12:24 pm, BobAlston<bobalst... (AT) yahoo (DOT) com> wrote:
I need to scan all of my queries to look for a specific criteria text.
Any query with this criteria text I need to look at further and probably
modify.

Any straight forward way to do this?

thanks

bob

There may be other ways directly within Access but I use a third party
product called Find&Replace
bobh.
OK. where can I find Find&Replace?

bob

Reply With Quote
  #5  
Old   
BobAlston
 
Posts: n/a

Default Re: Scan all queries for specific criteria text - 04-15-2011 , 01:09 PM



On 4/15/2011 11:52 AM, Bob Barrows wrote:
Quote:
BobAlston wrote:
I need to scan all of my queries to look for a specific criteria text.
Any query with this criteria text I need to look at further and
probably modify.

Any straight forward way to do this?

You could use VBA to loop through the Querydefs collection, searching each
querydef's SQL property for the string you are interested in, either using
InStr or a regular expression, and if found, either modify the SQL property
in the loop, or, if the numer of queries containing this string is small,
use DoCmd.OpenQuery to open the query in design view. With a large number of
queries, you probably don't want them all open at once, so you will probably
want to write the querydef names to the debug window so you can process them
at your leisure. Another benefit to this alternative is it reduces the
danger of false positives.

Another alternative that might do what you want is this tool:
http://www.rickworld.com/products.html



Thanks for the link to Rickworld. Never heard of this utility before.

Bob

Reply With Quote
  #6  
Old   
Access Developer
 
Posts: n/a

Default Re: Scan all queries for specific criteria text - 04-15-2011 , 01:42 PM



"BobAlston" <bobalston9 (AT) yahoo (DOT) com> wrote

Quote:
OK. where can I find Find&Replace?
At http://www.rickworld.com/, it's been around a long time, and many of us
have found it very, very useful.

Larry

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.