D
darthskeeter
I accidently deleted about 60 records from a database. I was able to
recover the records from an archived copy of the database but there is
an issue with the primary key values now.
The primary key (autonumber) field is used to generate a Spare Part #
field in the records. The items I've generated are already in use. So
when I copied the data from the archived database into the current
table, it just incremented the primary key autonumber field to a new
number.
Example:
Before I deleted records:
ID (Primary Key) Inventory Key
220 D-220
221 D-221
222 D-222
After I deleted records and copied back in from archive:
ID(Primary Key) Inventory Key
1337 D-220
1338 D-221
1339 D-222
If I change the primary key from Autonumber to Number, I can manually
change the "ID" entries back to what they used to be, but then I can't
change the field type back to "Autonumber".
I'm not an access whiz, so I was willing to manually change each ID
entry, but if there's some fancy SQL or other way to do it maybe I can
muddle through that... any ideas ?
Any help would be greatly appreciated.
recover the records from an archived copy of the database but there is
an issue with the primary key values now.
The primary key (autonumber) field is used to generate a Spare Part #
field in the records. The items I've generated are already in use. So
when I copied the data from the archived database into the current
table, it just incremented the primary key autonumber field to a new
number.
Example:
Before I deleted records:
ID (Primary Key) Inventory Key
220 D-220
221 D-221
222 D-222
After I deleted records and copied back in from archive:
ID(Primary Key) Inventory Key
1337 D-220
1338 D-221
1339 D-222
If I change the primary key from Autonumber to Number, I can manually
change the "ID" entries back to what they used to be, but then I can't
change the field type back to "Autonumber".
I'm not an access whiz, so I was willing to manually change each ID
entry, but if there's some fancy SQL or other way to do it maybe I can
muddle through that... any ideas ?
Any help would be greatly appreciated.