Where used query

  • Thread starter Thread starter Todd Heiks
  • Start date Start date
T

Todd Heiks

Is there a utility that I can use to see if a table or query is used in an
Access database?

Is there a way to open a module as a searchable string?

Thanks.
 
Todd -

You can open any existing module, or clik on the New tool in the Modules
Window to open the VBA editor. From there, Ctrl F or the binocular tool to
bring up the Find dialog box. In here, select 'Current Project' to search
all code in the database for the table or query name you enterin the 'Find
What:' box.

As for looking for a table or query in queries, I wrote this query a while
back to do that - you enter the table or query name at the prompt, and it
will list the queries that use that table/query.

PARAMETERS QueryTableName Text ( 255 );
SELECT MSysObjects.Name
FROM MSysQueries INNER JOIN MSysObjects ON MSysQueries.ObjectId =
MSysObjects.Id
WHERE (((MSysQueries.Name1)=[QueryTableName])) OR
(((MSysQueries.Name2)=[QueryTableName])) OR (((MSysQueries.Expression) Like
"*" & [QueryTableName] & "*"))
GROUP BY MSysObjects.Name;
 
"Todd Heiks" wrote
Is there a utility that I can use to see if a table
or query is used in an Access database?

Two third-party utilities (not freeware) for this purpose are Rick Fisher's
Find and Replace (http://www.rickworld.com) and Speed Ferret
(http://www.moshannon.com). The last time I looked at Speed Ferret, it did
not work directly with Access versions later than 2002, but that was some
time ago. In the past, I have used both of these programs with satisfactory
results. Either of them will find a given string used anywhere in the
database.
Is there a way to open a module as a searchable string?

You can access the lines in a module, or you can use the unsupported (but
not-at-all-secret SaveAsText option, for which a search of newsgroup
archives or Google or Bing should return many references). Both of these
allow you to search one line/record at a time, but neither, as far as I
know, will open the whole module as one "searchable string".

Larry Linson
Microsoft Office Access MVP
 
Larry Linson said:
"Todd Heiks" wrote


Two third-party utilities (not freeware) for this purpose are Rick
Fisher's Find and Replace (http://www.rickworld.com) and Speed Ferret
(http://www.moshannon.com). The last time I looked at Speed Ferret, it
did not work directly with Access versions later than 2002, but that was
some time ago. In the past, I have used both of these programs with
satisfactory results. Either of them will find a given string used
anywhere in the database.


You can access the lines in a module, or you can use the unsupported (but
not-at-all-secret SaveAsText option, for which a search of newsgroup
archives or Google or Bing should return many references). Both of these
allow you to search one line/record at a time, but neither, as far as I
know, will open the whole module as one "searchable string".

Larry Linson
Microsoft Office Access MVP
Thanks,
Todd
 
Thanks,


Daryl S said:
Todd -

You can open any existing module, or clik on the New tool in the Modules
Window to open the VBA editor. From there, Ctrl F or the binocular tool
to
bring up the Find dialog box. In here, select 'Current Project' to search
all code in the database for the table or query name you enterin the 'Find
What:' box.

As for looking for a table or query in queries, I wrote this query a while
back to do that - you enter the table or query name at the prompt, and it
will list the queries that use that table/query.

PARAMETERS QueryTableName Text ( 255 );
SELECT MSysObjects.Name
FROM MSysQueries INNER JOIN MSysObjects ON MSysQueries.ObjectId =
MSysObjects.Id
WHERE (((MSysQueries.Name1)=[QueryTableName])) OR
(((MSysQueries.Name2)=[QueryTableName])) OR (((MSysQueries.Expression)
Like
"*" & [QueryTableName] & "*"))
GROUP BY MSysObjects.Name;

--
Daryl S


Todd Heiks said:
Is there a utility that I can use to see if a table or query is used in
an
Access database?

Is there a way to open a module as a searchable string?

Thanks.


.
 
Back
Top