Nathan Koop
Nathan Koop

Reputation: 25197

Search for field references within a Microsoft Access "application"

I have inherited a MS Access "application" and would like to trace all references to one of the fields.

Is there a way to search for the field (all google hits are for querying the table).

NOTE: I am not looking for any SQL help, I'd like something like the Visual Studio right-click -> find all references type thing.

Upvotes: 12

Views: 22658

Answers (5)

sarh
sarh

Reputation: 6627

In my AccdbMerge utility there is a Find tool can search for a text across all loaded object definitions. Even though this is a diff&merge tool, this feature will work even if you will open only one file, and it is available in the free version which will search in tables, queries, macros, forms, reports and modules.

Upvotes: 0

Smandoli
Smandoli

Reputation: 7019

  1. Go to Tools > Analyze > Documenter
  2. "Select All" items in all categories
  3. Under Options, ensure "code" is checked (should be default)
  4. Run the Documenter report
  5. Export into .rtf or other text format
  6. Search on your field name

This is a good method because it is fast, free, and complete.

Aliases are exposed, in all their variety:

  • Standard SQL ALIAS in a query.
  • Use of the Caption or Description property of a table field.

It catches intersections of Access objects and VBA:

  • a user function in VBA that is called from a query object.
  • Use in VBA of the value from a control's Tag property.

Some Extra Tips:

  • If the Documenter seems to have provided everything except the object names, then it's having trouble coping with a long file path. Relocate your work closer to the C Drive so the file path is shorter, then run the Documenter again.
  • Of course if the database has links to outside data, you must deal with those! If it's an Access database, you can combine the reports into one.
  • The Access Documenter won't reveal the Object Description, as accessed through the Navigation Pane. The Object Description allows you to attach a bit of text to an object. It was once handy for providing design comments, but since version 2007 it is practically useless. Honestly I wouldn't worry about it, as it's naturally fallen out of use; but its omission from the Documenter is silly and sad.

Upvotes: 26

Jay Haase
Jay Haase

Reputation: 1989

You might also try the free add-in "Access Dependency Checker".

Upvotes: 3

Birger
Birger

Reputation: 4353

You can also do this without any external tools. MS Access has an option to show all references. You can do this by reight-clicking a table and choose the corresponding menu option.

However, some people have bad experiences with this option so the best thing to do might be to make a copy of the database and turn on the option there. (or just turn it off after you have the results you need).

Upvotes: -1

Tony Toews
Tony Toews

Reputation: 7882

See the Scan and replace utilities section at the Microsoft Access third party utilities, products, tools, modules, etc. page at my website.

Find and Replace is my preferred utility and it's quite inexpensive. There's a free limited version that works too. I've been using this tool for more than a decade. The author has also added some of my suggestions.

If you want a complete tool documenting all fields, etc, etc then you want FMS Inc's Total Access Analyzer 2007

Upvotes: 1

Related Questions