Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have deleted a few records.
    When adding a new record, Access automatically generates a new Autonum value sequentially by incrementing the last value regardless whether the corresponding records were already deleted. Is it a normal behavior of Access? Is it possible for Access to re-use the unused Autonum values.
    Armstrong

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='armsys' post='772832' date='29-Apr-2009 20:23']I have deleted a few records.
    When adding a new record, Access automatically generates a new Autonum value sequentially by incrementing the last value regardless whether the corresponding records were already deleted. Is it a normal behavior of Access? Is it possible for Access to re-use the unused Autonum values.
    Armstrong[/quote]
    Yes this is normal behaviour. To reset you need to delete all records then Compact and Repair.

    If you don't like this behaviour, don't use autonumber. instead use a long Integer number field, and set its value yourself by finding the current maximum, then incrementing by 1.
    Regards
    John



  3. #3
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='johnhutchison' post='772834' date='29-Apr-2009 17:27']Yes this is normal behaviour. To reset you need to delete all records then Compact and Repair.

    If you don't like this behaviour, don't use autonumber. instead use a long Integer number field, and set its value yourself by finding the current maximum, then incrementing by 1.[/quote]
    Thanks for your explanation.
    Armstrong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •