Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    canada
    Posts
    1

    Unanswered: Reset the Autonumber field of Access back to 1

    How can i reset the autonumber field back to 1?

    i used the autonumber to assign unique order no for each ORDER. but, i need it to be set to 1 again the next day, so how can i do this thing. deleting all records doesnt make any sense coz it just increment from the last number although deleted.

    i would appreciate any help you can give. thanks in advance.

  2. #2
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    4
    You need to compact the database. Access keeps the deleted records in the database. Only after a compact they will be deleted permanently and the recordnumbers are given free.

    Charles van Driest
    charles.vandriest@wanadoo.nl

  3. #3
    Join Date
    Jan 2002
    Posts
    1
    There seems to be an other way:

    If you insert a record with the autonumber field explicitly set to -1, the next number used will be 0, the 1, ...

    Good luck

Posting Permissions

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