473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 865
NeoPa
32,556 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

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

Similar topics

3
by: rdraider | last post by:
I'm doing a data conversion project, moving data from one SQL app to another. I'm using INSERT INTO with Select and have the syntax correct. But when executing the script I get: Server: Msg...
1
by: Nothing | last post by:
I received a db2 data file that I converted to MS-Access. From Access I ran the upsize wizard to put the tabel in SQL. It put the table in ok but all the data types are nvarchar. I have a couple of...
2
by: deko | last post by:
I have an unbound text box on a form that is set to: Format = Short Date (with the corresponding input mask) When I run this: DoCmd.RunSQL ("UPDATE tblOutput SET ApptStart = " &...
0
by: Roy | last post by:
Hi all, There is a column (col1) in Access data base that is adouble data type. In vb.net when I try to set a row filter for a view based on its table as: Dim dv As New DataView(MyDataTable)...
1
by: rharding | last post by:
I have a SQL database which contains a table (TblA) with a field (Fld1) defined as "bigint". When the SQL table is linked to Access the design view of the linked table shows this field as a data type...
8
by: mlwerth | last post by:
Dear Access Group: This is the most basic and most embarrassing of questions, but I cannot find where to change the data type of a text field that I have in Access 2003 to a number field. I've...
2
by: daknightuk | last post by:
I have created a database and I want to add a field to it which will store the password using the php encryption method of MD5 or SHA1 I just simply need to know what datatype to use in the...
6
by: Annabelle Lee | last post by:
HeyHey, I'v got stucked on this problems for days already. What I am trying to do is to change the data type of a sepcific colume within a table which I am importing to my Access database. My...
1
by: Philip Bulles | last post by:
I am wondering how to use transaction logs to recover change data capture tables. I figured out that CDC can view trx logs, and capture some specific data. But, once this is done, change data...
1
by: Cal3242 | last post by:
I am working on making a database for schoolwork and i was asked in corrections to change the data type from number to autonumber because when i go into design view and try to enter my records (for a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.