473,561 Members | 3,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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
1 869
NeoPa
32,564 Recognized Expert Moderator MVP
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
12071
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 8114, Level 16, State 5, Line 1 Error converting data type varchar to float. Is it possible to change the data type during the INSERT INTO statement?
1
4425
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 the fields that are cureny and some that are numeric. I need to change the data types from nvarchar to numeric type fields. I am new to SQL so I...
2
5294
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 = " & Me!txtApptStart) the value in the table is only a time value, or some other incorrect date.
0
4903
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) dv.RowFilter = "Col1 = 9999999999" -- col1=2222222222" doesn't cause problem I get this error message: "The value is to high for and int32" I'm not...
1
4584
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 of "Text". I have another linked table (TblB) with a field (Fld2) defined as "int". I need to join TblA to TblB using Fld1 and Fld2 as the join....
8
3259
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 searched high and low through help databases and on the internet. The directions say to : Open the table in Design view Click the Data Type...
2
2967
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 database for storing this type of information as I dont want data to be rejected or cut off because of field lengths. I would expect to encrypt something...
6
6974
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 code shows as following: Option Compare Database Option Explicit Private Sub cmdUpdateLoanStorage_Click() DoCmd.TransferSpreadsheet acImport,...
1
1431
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 capture cannot process this data again. I need data to be processed again because my db was restored without the KEEP_CDC options
1
1470
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 dental practice eg. client details) it would automatically enter the next number for the Appointment ID (1,2,3,4 etc.) but when i try this for each...
0
7562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7855
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8074
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7608
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7926
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5465
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5181
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3594
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1172
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.