Changing Data Type

ahennema

New Member
Joined
Sep 14, 2005
Messages
34
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I was asked to look at somebody elses Access 2002 DB with a request to change a field "Req Nbr" which is an auto-number field to a non-autonumber field so the user can fill in their own values. Also the field is a Key field used to link to another table.
Can I change the field type to just number? When I attempt it says I can't change it without dropping the link. Could I drop th link, change it and then relink it?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Someone asking to change the PRIMARY KEY to something someone CHOOSES to fill in? Personally I would tell them that they are NUTS! That is an ATROCIOUS idea. It is okay to have an EXTRA field if you want a special number but they shouldn't even be concerned with what the primary key is. The primary key is what keeps the links between the data and helps maintain referential integrity. It really should just be something that is hidden and the system uses. At least that's my take on it.
 
Upvote 0
Can you drop the link, change the datatype to number, then relink? Yes. Should you? NO!

Without talking about the possibile ramifications of someone hand changing the number on the new (or even old) records, there will proably be some part of the db that relies on automatic insertion of that number for the db to work properly. All kinds of things could break.

Add a new field like boblarson recommends and leave the auto field be.

hth,

Rich
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top