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.