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

How can I find all instances of "tblCFClientChanges" in an Access 97 database?

P: n/a
MLH
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

MLH wrote:
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.


Read this:
http://www.mvps.org/access/resources/products.htm

Nov 13 '05 #2

P: n/a

MLH wrote:
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.


Read this:
http://www.mvps.org/access/resources/products.htm

failing that, you could loop through the SQL property of all your
queries and use InStr and Replace and all that, but that's probably a
huge pain.

Nov 13 '05 #3

P: n/a
Per MLH:
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.


FindAndReplace: http://www.rickworld.com/

Couldn't live without it.
--
PeteCresswell
Nov 13 '05 #4

P: n/a
In addition to the Find & Replace, you can try the Search function of
mztools: www.mztools.com. It does a fine job and you can't beat the price.

"MLH" <CR**@NorthState.net> wrote in message
news:r6********************************@4ax.com...
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.

Nov 13 '05 #5

P: n/a
I've used this a lot...

Dim qd as dao.querydef
dim sFind as string
sFind = "tblCPCLientChanges"

For each qd in currentdb.querydefs
if instr(1, qd.sql, sfind, vbTextCompare) > 0 then
debug.print qd.name
end if
next qd

This also check rowsources for listboxes and combo boxes and they are
querydefs also. Be careful - if you have tables or other text that include
the string you're searching for, such as tblCPCLientChangesDetail, this will
return a positive result. You can change sFind to

sFind = "tblCPCLientChanges "
or
sFind = "tblCPCLientChanges."
or
sFind = "[tblCPCLientChanges]"

That takes care of queries. There are third party software packages that
analyze Access databases, such as FMS software. There are also tools in
later versions of access that convert macros to modules. I think you can
still open a module in '97 as

dim doc as document
set doc currentdb.containers("Modules").document ("document" is the
module name)

and read line by liine and do the same search string.

Good luck.

Matthew Wells
MW****@FirstByte.net



"MLH" <CR**@NorthState.net> wrote in message
news:r6********************************@4ax.com...
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.

Nov 13 '05 #6

P: n/a
MLH
Thanks, Matthew. Do you know if this
will work for me in Access 2.0?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I've used this a lot...

Dim qd as dao.querydef
dim sFind as string
sFind = "tblCPCLientChanges"

For each qd in currentdb.querydefs
if instr(1, qd.sql, sfind, vbTextCompare) > 0 then
debug.print qd.name
end if
next qd

This also check rowsources for listboxes and combo boxes and they are
querydefs also. Be careful - if you have tables or other text that include
the string you're searching for, such as tblCPCLientChangesDetail, this will
return a positive result. You can change sFind to

sFind = "tblCPCLientChanges "
or
sFind = "tblCPCLientChanges."
or
sFind = "[tblCPCLientChanges]"

That takes care of queries. There are third party software packages that
analyze Access databases, such as FMS software. There are also tools in
later versions of access that convert macros to modules. I think you can
still open a module in '97 as

dim doc as document
set doc currentdb.containers("Modules").document ("document" is the
module name)

and read line by liine and do the same search string.

Good luck.

Matthew Wells
MW****@FirstByte.net



"MLH" <CR**@NorthState.net> wrote in message
news:r6********************************@4ax.com.. .
Mainly, I want to search the saved queries.
I don't want to replace them. I just want to find them.


Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.