Changing a field name after records have been created

G

Guest

Hello,

We have received a request from the 'owners' of the database to change a
field name in a clinical trial patient database that already has some
patients entered into it (thankfully, we dealing w/ 'test' data!).
Unfortunately, this field is a 'header' field, and thus appears in every
table/form. I plan on changing the field name in the tables (to 'ptin'),
then deleting the now-obsolete field ('pat-init') on the form and adding the
new field. I also have a good sense of what modules this field is a part of
and will update the field name there as well.

Are there any obvious red flags (besides consistency across all
tables/forms/code in spelling) in doing this in a database w/ data in it?
Will Access have any trouble reading the existing records once this change
has been made across the database?

Thanks.
 
A

AlCamp

Pat,
If I understand correctly, don't delete Pat-Init from your table, just
rename it in the table design to PtIn. The data will still be there...
under the new name.
No need to delete any controls named Pat-Init... just fix the queries and
rename the control.
Now, find all the module code, macros, and calculated fields where
Pat-Init is used, and replace with PtIn.

With the table change, and all the changes in the queries, forms,
reports, etc.. your DB should work just as before.

I love these kinds of changes... if a client really wants to pay me good
money for no good reason (and changing Pat-Init to PtIn appears to be just
that), I'm more than glad to assist them.

hth
Al Camp
 
S

Sandra Daigle

Hi Pat,

As long as you dot all of the i's and cross all of the t's you'll be fine.
Renaming a field can be very tedious but it can be done. Be sure to do the
obvious things like make and keep a back-up. Also be sure to watch for Event
procedure that become disconnected from controls if you rename the control.

Fortunately there are some tools that can help you - the one I used for
several years is called "Find and Replace" and is available as shareware:
http://www.rickworld.com/products.html. The tool I currently use is a bit
pricier but faster and more powerful. It is called Speed Ferret -
http://www.moshannon.com/.
 
S

Sandra Daigle

AlCamp said:
Pat,
If I understand correctly, don't delete Pat-Init from your table,
just rename it in the table design to PtIn. The data will still be
there... under the new name.

Good point - I missed that part.
 
G

Guest

Thank you Al and Sandra,

This sort of change is nerve-wracking-- especially when dealing w/
deadlines. I'll check those tools out, also.

Patrick

Sandra Daigle said:
Hi Pat,

As long as you dot all of the i's and cross all of the t's you'll be fine.
Renaming a field can be very tedious but it can be done. Be sure to do the
obvious things like make and keep a back-up. Also be sure to watch for Event
procedure that become disconnected from controls if you rename the control.

Fortunately there are some tools that can help you - the one I used for
several years is called "Find and Replace" and is available as shareware:
http://www.rickworld.com/products.html. The tool I currently use is a bit
pricier but faster and more powerful. It is called Speed Ferret -
http://www.moshannon.com/.

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.


Pat said:
Hello,

We have received a request from the 'owners' of the database to
change a field name in a clinical trial patient database that already
has some patients entered into it (thankfully, we dealing w/ 'test'
data!). Unfortunately, this field is a 'header' field, and thus
appears in every table/form. I plan on changing the field name in
the tables (to 'ptin'), then deleting the now-obsolete field
('pat-init') on the form and adding the new field. I also have a
good sense of what modules this field is a part of and will update
the field name there as well.

Are there any obvious red flags (besides consistency across all
tables/forms/code in spelling) in doing this in a database w/ data in
it? Will Access have any trouble reading the existing records once
this change has been made across the database?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top