469,127 Members | 1,306 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,127 developers. It's quick & easy.

How do you change a data type of a table field in ms access without having to create

I have a customerID as a primary key (Autonumber) and when I put customerID on another table I left it as short text instead of obviously number data type and I only realised after I created my forms and queries. Is there a way of changing data type and still being able to update my table using the forms I created with having to delete relationship, fix and redo all my forms?

When I change the data type this message appears "Some data will be lost. the setting for the fieldsize property of one or more fields has been changed to a shorter size. if data is lost, validation rules may be violated as a result"
May 7 '17 #1

✓ answered by NeoPa

Redoing any related relationships is a no-brainer. Of course you'll need to do that as the current one is to a field that is no longer defined as it was when the relationship was created. You may be able to update it, but that won't save you much time, so why bother.

Any forms that include any references to, or dependencies on, the changed field will need to be updated to reflect the change. This won't generally be a lot of work, but that depends to a certain extent on how involved the forms are.

The only good news really, is that there's no reason for any data actually to be lost if you ensure the data's converted rather than just deleting the field and starting again. I suggest a backup immediately prior to any work you do on the database.

Good luck.

1 713
NeoPa
32,162 Expert Mod 16PB
Redoing any related relationships is a no-brainer. Of course you'll need to do that as the current one is to a field that is no longer defined as it was when the relationship was created. You may be able to update it, but that won't save you much time, so why bother.

Any forms that include any references to, or dependencies on, the changed field will need to be updated to reflect the change. This won't generally be a lot of work, but that depends to a certain extent on how involved the forms are.

The only good news really, is that there's no reason for any data actually to be lost if you ensure the data's converted rather than just deleting the field and starting again. I suggest a backup immediately prior to any work you do on the database.

Good luck.
May 7 '17 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Nothing | last post: by
reply views Thread by Roy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.