Results 1 to 5 of 5
  1. #1
    GordonT is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2012
    Location
    Lincolnshire
    Posts
    12

    Autonumber now starts at 1

    I have a database which is used once a year, and after use the main record is deleted. Each year the ID Autonumber carries on from the previous year. But this year the ID reverted and started from 1, its not a problem but I am curious why.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    autonum field always picks up where it left off.
    if you empty the table, then compact the db, It resets to 1.

  3. #3
    GordonT is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2012
    Location
    Lincolnshire
    Posts
    12
    I certainly emptied the table, but as for compacting it the procedure was the same as previous years so why it compacted I don't know. Anyway, thank you for your help.

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you are deleting data often, it is actually recommended that you Compact the database from time-to-time to reduce database bloat.
    When you delete data, it does not actually reduce the size of the database until it has been compacted (the data is really still there behind the scenes and just marked for deletion until you do).

    The Autonum field is really just intended to guarantee a unique value within the data in the current table. If you want the field to have some other sort of meaning, you probably want to create a Custom ID field instead of using Autonum.

  5. #5
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    If you delete the key field, then add it back, it starts over at 1 also I believe.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Reset a field when a new day starts
    By ashraf_al_ani in forum Forms
    Replies: 6
    Last Post: 08-05-2014, 10:02 AM
  2. Replies: 2
    Last Post: 07-14-2014, 08:59 AM
  3. Replies: 4
    Last Post: 11-21-2013, 05:06 PM
  4. Access starts installing
    By arunkumar213 in forum Access
    Replies: 0
    Last Post: 06-15-2011, 03:53 AM
  5. How to add ID 1 above table that starts with ID 2 ?
    By Plomo in forum Database Design
    Replies: 2
    Last Post: 09-03-2009, 12:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums