Given a Microsoft Access table that has an Autonumber as it's primary key, I need an algorithm to find unused autonumber key field values; i.e. records that have either been deleted or cancelled; so that I can reuse these IDs by inserting records into the table using the unused number.
Hope this makes sense.
ID Autonumber (PK)
ID Firstname Lastname
1 John Smith
3 Paul Jones
Need effective algorithm to find that ID=2 is unused.
This table contains thousands of records, so that performance is KEY.