Seeing all queries that include a certain field

TobyMace

Registered User.
Local time
Today, 23:08
Joined
Apr 13, 2018
Messages
65
Hi all,

I am trying to make some adjustments to an existing database that a previous employee created. There are quite a number of queries in which one particular field "Part_Number" from the table "GRAAN_Data" is called up. I have added another field "Part_Number_2" to the same table. All queries that call up "Part_Number", I want to also call up "Part_Number_2". However I don't really want to manually go through each query and look for each one that contains "Part_Number".
So my question is - is there a quick way to see all queries that a certain field is "linked" to.

Thanks in advance.
 
Yes. Use object dependencies from the database tools menu
Select your table and then 'objects that depend on me'
You will get some false positives that reference other fields in that table but unless there are lots of irrelevant items it's hardly worth writing code to do so
 
Last edited:
The only thing I would add is to ask if you have any dynamically created queries (i.e. non-static references)? If so, then you also need to search your code modules for the field name in question. One FIND operation is sufficient since it is a "project-level" FIND action.
 
@TobyMace,

If you work with named queries (saved queries), you could create a procedure in vba to loop through all saved query SQL looking for "GRAAN_Data" and/or "Part_Number". That would work for named queries, but would not "find" such values in vba procedures.

That's where I'd start, but it depends on how many tables/queries you are dealing with.

Good luck.
 
If you don't already own Total Access Analyzer by www.FMSINC.com, now would be a good time to buy it. It has dozens of useful reports to help you to understand the structure of a database. It is invaluable when working with databases created by others and event those created by yourself when you have to go back to them after some time away.
 

Users who are viewing this thread

Back
Top Bottom