Autonum changed when insert a register in middle of table

26 views Asked by At

I've detected a change in the way autonums are being managed in access. May be due to de access verions.

Till Access 2003, when I insert a record in the middle of a table that uses autonum key to create new record, the autonum counter keeps its original value. I mean:

  • The ID field is an autonun, which actual value is 1000
  • I insert a new record (using a query) with an ID value of 400

This is what happens:

  • If I insert this record in one computer running access 2003 the ID autonum stays in 1000, so next record that is added recieves an ID of 1001. Good for me!
  • If I insert this record in one computer running access 2010 the autonum IS SET to the last manually assigned value, so next record that is added recieves an ID of 401. Bad for me!

Am I wrong or this is due to the Access version? Is anything related to MDAC? Can I do something to avoid the autonum reset when inserting?

Thank you

0

There are 0 answers