Determine which queries/forms use a specified table

How can I determine which queries/forms within an Access database use a specific  table?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
Hi sfmoore2006,

Rick Fisher's 'Find & Replace utility' (, free 30-day trial, $39 buy) is an Access add-in that allows you to find and replace strings in your Access database, and can do this in all areas:  Tables, table definitions, queries, query definitions, forms, form controls, reports, report controls, database properties, and all VBA code.  

This way, you can enter a query/form name, hit Search, and find/replace everywhere in your app its used.

I've been using this for ten years now and love it.

Hope this helps.
Leigh PurvisDatabase DeveloperCommented:
Which version of Access?
Raynard7Connect With a Mentor Commented:
For queries it is not too hard.  The idea is that you can cycle through all the queries using VBA and ask for the SQL contained within and then say is this sql like the table name.

this is done at

where they obtain a list of all the queries (querydefs) and then extract their name (substitute with .sql) and then say if q.sql like "*" & tablename & "*" then debug.print

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

What's the actual purpose of this?
Do you need to rename objects?

There are loads of tools out there to rename fields/tables/forms/variables and all sorts.
sfmoore2006Author Commented:

Thanks for all the quick responses.  The Access version is 2000.  The VBA solution for finding which queries use a given table will be a big help!  The purpose is not to rename tables; its basically to help us perform maintenance and development on an existing database which contains numerous queries, tables, and forms developed over time by various people without very much documentation.
Leigh PurvisConnect With a Mentor Database DeveloperCommented:
Yeah - then either a third party tool - or iterating through the collections of other objects looking for your tables is the only way.

(Access 2003 has a dependency object added to it's OM now which is quite good at this - and much faster - not requiring opening of all the objects.  That's the reason I asked about version :-)
You should check out

They provide a renaming tool - and they also do a code documentor tool, too.

Very reasonable.
sfmoore2006Author Commented:

I believe I've closed this one out.  Thanks to all for taking the time to help.  In addition to the VBA solution, I'll be following up on the 'Find and Replace' utility per jimhorn.  Ten years of satisfaction with the product is pretty high praise!

FYI, I was never able to reach the site is no longer valid or is having problems.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.