tags:

views:

343

answers:

5

We've inherited an MS Access db/application (Office 2002) with great names such as NewTable, Subform or Macro1. Unfortunately, when we change these to more meaningful names, the references (in other Queries, Forms or Actions) are not updated.

How can we find out where a specific object is used?

+1  A: 

You are actually looking for dependencies I gather. I googled a bit and came across ;

http://www.fmsinc.com/Products/analyzer/

http://www.aadconsulting.com/obdepoff.html

They aren't free however...

Peter
+1  A: 

You can check the system tables, MSysObjects and MSysQueries for references to tables and queries (you can also check the sql string of querydefs). You can loop through the properties of forms and reports, and their controls, for references to tables, queries and macros. You can search code.

The Name Change auto-correct option is usually deprecated, but it may have a place here.

Remou
You forgot to mention searching the VBA code.
David-W-Fenton
I don't think so, last line, first paragraph "You can search code" :)
Remou
This is pretty much what I was looking for. Not exactly great documentation (and the mentioned tools probably offer a "nicer" representation of the information), but enough to work with.
IronGoofy
A: 

If you have Access 2003 installed somewhere: there is an option to list all dependencies. Just right-click an object and choose Object Dependencies (I'm not sure about the translation, I have a Dutch version here).

This will show you dependencies in both directions.

After opening the database in Access 2003 you can still use it in Access 2002. If you are unsure, you can always create a backup copy.

birger
I know of no one who uses Access on regular basis who leaves Name Autocorrect turned on, because it causes performance problems and corruption.
David-W-Fenton
True, but it is also easy to turn it off again. And then it is one of the easiest methods to get to the desired result.
birger
+1  A: 

A shareware tool that can help you with much of this is Rick Fisher's Find and Replace. It has a 30-day trial and costs $30 to register.

Another more full-featured tool is Black Moshannon's Speed Ferret. It's a really excellent product, though relatively expensive ($170). It's also rather problematic in that they never released a native version for Access 2003 or 2007. But you're in luck in that regard as you're dealing with 2002.

If you really want to do this quickly, Speed Ferret is definitely worth the money. Consider your hourly rate and any significant project will pay for itself the first time you use it.

Rick Fisher's tool is less professional and less full-featured, but may be sufficient for your needs. I've only tested it, never used it in a full-fledged project.

David-W-Fenton
A: 

There is this small add-in, free and usefull vtools, that, among other possibilities, specifically allows you to search for values in all access objects (tables, queries, code, forms, ...).

Philippe Grondier