Automate changes of fieldnames in tables/queries

Ron_dK

Cool bop aficionado
Local time
Today, 09:03
Joined
Sep 5, 2002
Messages
2,141
I have a reasonable large dbase with some 12 tables and some 40 Queries.
In three of the tables, there are fields with dubious names like AA1, CD-3, 227, etc.
I want to change these field names to some more appropriate names like : Testblok , Cspeler, Jaarnummer, etc, etc.

In doing so, I will have to go thru each and every Query ( and at a later stage forms/reports) to change the fieldnames in that query corresponding to the changes I made in the initial table field name.

Would there be another way of doing this, i.e. is there a routine for changes made in the fieldnames, being “automatically updated in the table bound query.

Appreciate any pointers.
 
Access 2000 introduced Automatic updates for changes to object names. Changes are tracked in a system table. However it has to switched on via the options form, And only then will it track changes. it cannot be performed retrospectively.

It is recommended that this system is switched off when a system goes live.
 
Last edited:
Thanks for that Dennis, I'm running Access 2003 but can't find anything like automatic updates in the Options tabs.
There is a table : MSysObjects which gives my the properties for tables and queries , but it does not specify the field properties in those tables/queries.

Any other suggestion ?
 
Rak,

in 2003 its on the general tab, track auto name correct.
 
Dennis,
Found it and tested it. It really does what I'm looking for :
changing a field's name in the table which will accordingly change the name in all queries/forms/reports.

In the options I switched on Trackname
Perform name ...
Log name ...

which gives me a log of all changes made in the tables and so on.

Great feature and thanks bloody dutch for that . ;)


One note though :
Changes made to field names are not (automatically ) corrected in textbox control source.

Example :

Textbox34 control source =DCount("[Qryanalyze]![CD-2]","Qryinput"," [Allnummers] between #01/01/2008# and #12/31/2008# ")

I changed the fieldname of CD-2 to Cspeler, which is NOT corrected in this
control source statement.
 

Attachments

  • tracknameoptions.JPG
    tracknameoptions.JPG
    44.3 KB · Views: 99
Last edited:
Rak,
Names are not changed in code either so a replace all is required.
 

Users who are viewing this thread

Back
Top Bottom