jlinden 0 Newbie Poster

I have a database in access that allows user to create a record that uses the autonumber to create the primary key. On occassion, the autonumber generates a key, but the user may later choose to undo the insertion of that record. This all works fine except, after the user undo's the insertion of a record, the autonumber has still be incremented, which cause gaps in the primary keys for the records. How can I decrement the autonumber value (in VBA preferably) to prevent these gaps in the autonumber sequencing?

Thanks,

jlinden