Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a number to an autonumber field

Status
Not open for further replies.

RTorrance

Programmer
Joined
Apr 12, 2002
Messages
64
Location
CA
Hello,
Does anyone know of an easier way to change a number field to an autonumber field than recreating the whole table and importing all records to the new table. Any help would be appreciated. Thanks.
 
RTorrance

I answered this one last night. Please review this link...
thread700-686462
 
willir
thanks for the response but that doesn't really answer my question. I have a field that is of type number and I need it to be an autonumber. I don't need to reset the autonumber because I don't have it yet.
 
Whoops, misunderstood your question. My bad.

Yep, Access does not like changing a long interger to an autonumber even for an empty table.

If you have linked data in the existing table, I suppose you could add a new field, and give it an autonumber property.

Then you have to go through and reset your links to use the autonumber - a query should work.

Then make the new autonumber the primary key.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top