NvrGivUp
NvrGivUp

Reputation: 27

How to change data type number to autonumber where the table already contains data

One of my team mates accidentally put Number instead of autonumber for one column and populated the table with 5000 records. How do I change it to autonumber when the table is already populated?

Upvotes: 2

Views: 5627

Answers (1)

Philip Stephen Allen
Philip Stephen Allen

Reputation: 41

The only way to do this, as far as I know, is to create a new table with identical fields (except with the autonumber field instead of the number field), and then port all of the data in with a query.

From there, go through and modify any existing queries, code, or forms that refer to the old table and point them to the new table.

I've been through this with MS Access... it's not hard, but is a pain in the butt.

Upvotes: 4

Related Questions