Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Determine which queries/forms use a specified table

Posted on 2006-07-12
8
Medium Priority
?
241 Views
Last Modified: 2012-08-14
How can I determine which queries/forms within an Access database use a specific  table?
0
Comment
Question by:sfmoore2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 17095657
Which version of Access?
0
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 200 total points
ID: 17095687
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

http://www.experts-exchange.com/Databases/MS_Access/Q_21181895.html

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 q.name

0
 
LVL 26

Expert Comment

by:dannywareham
ID: 17095738
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:sfmoore2006
ID: 17095810

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.
0
 
LVL 44

Assisted Solution

by:Leigh Purvis
Leigh Purvis earned 80 total points
ID: 17095826
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 :-)
0
 
LVL 66

Accepted Solution

by:
Jim Horn earned 220 total points
ID: 17096405
Hi sfmoore2006,

Rick Fisher's 'Find & Replace utility' (http://www.rickworld.com, 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.
-Jim
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 17098150
You should check out www.ssw.au.com

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

Very reasonable.
0
 

Author Comment

by:sfmoore2006
ID: 17104978

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 www.ssw.au.com--perhaps the site is no longer valid or is having problems.
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question