• How to Reset Autonum

    Author
    Topic
    #459451

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1158493

      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

      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.

      • #1158495

        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.

        Thanks for your explanation.
        Armstrong

    Viewing 0 reply threads
    Reply To: How to Reset Autonum

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: