By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,773 Members | 2,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,773 IT Pros & Developers. It's quick & easy.

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

P: 1
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.

Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,417
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.