Shortcuts for fixing all object types after renaming a table? (1 Viewer)

Hello1

Registered User.
Local time
Today, 03:30
Joined
May 17, 2015
Messages
271
Hello,

Is there something like a shortcut for doing this instead going through every query, form, report and code line for fixing them with the new name of the table?

Thanks
 

vba_php

Forum Troll
Local time
Yesterday, 19:30
Joined
Oct 6, 2019
Messages
2,880
Hello,

Is there something like a shortcut for doing this instead going through every query, form, report and code line for fixing them with the new name of the table?

Thanks
are you talking about the rest of the objects that use the renamed table in a dependency situation? as in, a form that uses the old table as a recordsource, but becomes a broken dependency when the table is renamed? if so, vba should be able to fix it with a small routine. it looks like it might be included in galax's link....
 

Hello1

Registered User.
Local time
Today, 03:30
Joined
May 17, 2015
Messages
271
Yup thats what I wanted. The tool above looks good but I went with the Database Documenter because I started before seeing the tool. However, good to know about it.
 

apr pillai

AWF VIP
Local time
Today, 06:00
Joined
Jan 20, 2005
Messages
735
Access - -> Options -->Current Database - ->
Put Check Marks under Name AutoCorrect Options
  • Track Name AutoCorrect Info
  • Perform Name AutoCorrect
 

isladogs

MVP / VIP
Local time
Today, 01:30
Joined
Jan 14, 2017
Messages
18,209
Autocorrect can be very useful though many developers avoid using it as it can cause issues. I do use it but with care.
Whatever your view about the feature, it doesn't update names in module code or macros. So you would still need to deal with them separately. V-Tools is free and can also replace names in module code but not macros.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 01:30
Joined
Sep 12, 2006
Messages
15,634
if you change a table name, (or a field name) you will need to fix any query or code using the table name. It may autofix, and you may have tools that can do it, but it's worth checking before you publish the change. If you include spaces in the new name you will need to add square brackets round any identifiers.

it's relatively easy to write a module to change query SQL, but it needs checking carefully.
 

Users who are viewing this thread

Top Bottom