Solved List any queries that are using a table? (1 Viewer)

Number11

Member
Local time
Today, 02:12
Joined
Jan 29, 2020
Messages
607
Hi, So i need to change the layout of a table and also re-name the fields, and i was wondering is there a way of finding out which tables are liked/using the table i wish to update so i can then update them also?
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:12
Joined
Feb 19, 2002
Messages
42,981
The Dependency Checker is great if you use querydefs or sql as the RecordSource for forms/reports or the RowSource for combos/listboxes. If you use embedded SQL (SQL you hard code in your VBA procedures), you're SOL unless you have another tool.
 

Isaac

Lifelong Learner
Local time
Yesterday, 19:12
Joined
Mar 14, 2017
Messages
8,738
Will Name Auto Correct handle any of this? (Sincere question - I don't know as I always turn it off, as per advice from years ago, and usually write my own code to loop through currentdb.querydefs.sql properties).
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:12
Joined
Feb 19, 2002
Messages
42,981
Name auto correct is quite dangerous which is why we recommend that it be turned off. However, if you knw what it does and you want its help, you can turn it on, make your changes, and then turn it off again. What trips people up with NameAutoCorrect is that people don't understand exactly WHEN the change gets propagated. The answer to that is, the next time you open the object that was affected. So, if I change columnX to columnY, the change is logged in the change log but nothing else happens. Then when I open query1, columnX is renamed to columnY. Then I open Report1 and columnX is renamed to columnY, etc. ChangeAutoCorrect NEVER changes VBA. It only changes querydefs and bound controls. It doesn't change calculated controls. So if you have a control --
=ColumnX * .45

ColumnX will NOT be updated (unless something has changed).

So, make sure you know what you are doing and are prepared to open ALL objects that might be affected. You don't want to leave them, because if you turn off Name Auto Correct any object that would have been affected will not be updated if you din't open it before you turned off the property. I attached some documentation as well as a PPT that I created for a presentation and a database you can experiment with.

Do NOT turn NameAutoCorrect on unless you understand what it does.
 

Attachments

  • NameAutoCorrectDOC.zip
    81.3 KB · Views: 125
  • NameAutocorrectPPT.zip
    182.7 KB · Views: 77
  • NameAutoCorrectSampleDB.zip
    22.3 KB · Views: 66

Minty

AWF VIP
Local time
Today, 02:12
Joined
Jul 26, 2013
Messages
10,355
V-Tools Deep search will find almost every reference to a field or table.
 

Isaac

Lifelong Learner
Local time
Yesterday, 19:12
Joined
Mar 14, 2017
Messages
8,738
Name auto correct is quite dangerous which is why we recommend that it be turned off. However, if you knw what it does and you want its help, you can turn it on, make your changes, and then turn it off again. What trips people up with NameAutoCorrect is that people don't understand exactly WHEN the change gets propagated. The answer to that is, the next time you open the object that was affected. So, if I change columnX to columnY, the change is logged in the change log but nothing else happens. Then when I open query1, columnX is renamed to columnY. Then I open Report1 and columnX is renamed to columnY, etc. ChangeAutoCorrect NEVER changes VBA. It only changes querydefs and bound controls. It doesn't change calculated controls. So if you have a control --
=ColumnX * .45

ColumnX will NOT be updated (unless something has changed).

So, make sure you know what you are doing and are prepared to open ALL objects that might be affected. You don't want to leave them, because if you turn off Name Auto Correct any object that would have been affected will not be updated if you din't open it before you turned off the property. I attached some documentation as well as a PPT that I created for a presentation and a database you can experiment with.

Do NOT turn NameAutoCorrect on unless you understand what it does.
Thanks for the explanation Pat
 

Users who are viewing this thread

Top Bottom