change a random-valued autonumber field

M

Mari

I was fooling around and changed some field information and now the computer
won't let me change it back. I need to change a random-valued AutoNumber
field to an incremental AutoNumber field
 
K

KARL DEWEY

I assume you have other tables related to this field.

You will have to rebuild the the relationships between the tables. Backup
the entire database first so if all fails you can start over. You will
probably need to update your queries also. Delete the relationship between
TableA and TableB & TableC.

After backing up the database change the random-valued AutoNumber field to a
number field - long interger. Add autonumber field to TableA. Add a number
field - long interger to the other tables. Run an update query on TableB and
TableC to update the new number field from TableA autonumber field.

Make TableA autonumber field the primary key. Set new relationships
for TableA to TableB & TableC.

Do not delete the old fields in TableB & TableC. Make another
backup at this time so you now have three versions.

I would wait several months unless you really know your database in's and
out's.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top