My Assistant
![]() ![]() |
|
|
Aug 13 2004, 04:08 PM
Post
#1
|
|
|
UtterAccess Member Posts: 30 |
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 |
|
|
|
Aug 13 2004, 04:19 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,635 From: Chicagoland, USA |
If you remove all the data from the table and then do a compact and repair, the autonumber will be reset.
|
|
|
|
Aug 13 2004, 04:27 PM
Post
#3
|
|
|
UtterAccess Ruler Posts: 1,692 From: Nevada |
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. |
|
|
|
Aug 14 2004, 03:32 PM
Post
#4
|
|
|
UtterAccess Ruler Posts: 1,692 From: Nevada |
OH! and before you mess around with keys, make a backup of your database (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif)
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 09:28 PM |