Full Version: Auto Number
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
Bac
How do i reset the auto number, i have two tables that i need to be linked, but i accidenlty incremented one of the tables auto numbers so now they are out of sync

thank you
balaji
If you remove all the data from the table and then do a compact and repair, the autonumber will be reset.
preston
I think Balaji has got it. There's no way you can automatically restore relationships when you've fiddled with the data that related them. What I would do is:

Leave the Autonumber field in the parent table alone.

Create a form based on the Child table. for the FK field that corresponds to the Parent ID, use a combo box that uses the parent table as the source and saves the parent's ID to the FK field in the Child table.

manually go through each child record, open the combo box and choose its correct parent record.
preston
OH! and before you mess around with keys, make a backup of your database wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.