Bac
Aug 13 2004, 04:08 PM
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
Aug 13 2004, 04:19 PM
If you remove all the data from the table and then do a compact and repair, the autonumber will be reset.
preston
Aug 13 2004, 04:27 PM
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
Aug 14 2004, 03:32 PM
OH! and before you mess around with keys, make a backup of your database
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.