Changing table/field names

S

scott

i have a table that needs renaming, but there are many queries that use that
table. I can remember a while back changing a table name and the associated
query changed the table name automatically when i changed the table name.

Is there a trick to make maual table name changes auto change any associated
querys?
 
T

tina

if you're running A2000 or later, you might try turning ON the Name
AutoCorrect feature, then changing the table name. strongly recommend you do
the following, though:

1. try this on a COPY of your database, so you can just discard the db if it
doesn't work.
2. if it does work: create a new blank database and immediately turn OFF the
Name AutoCorrect feature. then import all the objects from your database
into the new one. the goal here is that you want a clean database with Name
AutoCorrect turned OFF - that feature causes tons of problems and headaches
that you don't want dogging your database.

note: Name AutoCorrect will not correct the table name in code, or in
expressions in calculated controls or query fields, AFAIK. you'd need a
third-party product to do that.

hth
 
S

scott

what exactly will it change?


tina said:
if you're running A2000 or later, you might try turning ON the Name
AutoCorrect feature, then changing the table name. strongly recommend you
do
the following, though:

1. try this on a COPY of your database, so you can just discard the db if
it
doesn't work.
2. if it does work: create a new blank database and immediately turn OFF
the
Name AutoCorrect feature. then import all the objects from your database
into the new one. the goal here is that you want a clean database with
Name
AutoCorrect turned OFF - that feature causes tons of problems and
headaches
that you don't want dogging your database.

note: Name AutoCorrect will not correct the table name in code, or in
expressions in calculated controls or query fields, AFAIK. you'd need a
third-party product to do that.

hth
 
T

tina

AFAIK, it will change the names of tables directly referenced in queries, in
form RecordSource properties, and in report RecordSource properties. i can't
give you a definite answer because 1) i never leave Name AutoCorrect turned
on in a new database, and 2) i never change the name of a table after i
finish the table/relationship structure and move on to the next step in
building the database.

my previous response was a suggestion of something you can *try*, not an
"i've-done-this-before-and-it-works" solution. since the end user should
never see a table name, personally i never change a table's name once i've
built other objects based on it - offhand, i can't think of any situation
where you would absolutely need to change a table name.

hth
 
Top