?
Solved

Resetting Auto number ID column

Posted on 2008-06-15
4
Medium Priority
?
565 Views
Last Modified: 2013-11-27
Greetings Experts,

I don't think this should be a difficult thing to do but I can't seem to figure it out: I have a table in an Access database and because of several script tests, I have a lot of test records that I've had to delete.   Even though I've deleted these test records, the autonumber ID column continues to assign the culmulative total of all records ever created i.e. I've run 17 tests, deleted all 17 records, run another test and the autonumber ID column starts number from 18.

How do I reset the autonumber column ID so it starts numbering records from 1 after running and deleting these test records?  I hope that was clear and thanks for the help!
0
Comment
Question by:max7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Assisted Solution

by:darkmooink
darkmooink earned 500 total points
ID: 21790173
the way i have done it in the past, although I don't believe it is the easiest or best way of doing it, is by deleting the column and then recreating it.
0
 
LVL 31

Assisted Solution

by:hnasr
hnasr earned 720 total points
ID: 21790385
To start autonumbering.
1 Create a new table
2 Append old table to new one
3 Delete old table
4 Rename new table to old name.
0
 
LVL 58

Accepted Solution

by:
harfang earned 780 total points
ID: 21790584
When you use (Tools | Database Utilities | Compact and Repair Database...), all empty tables get their counter reset to 1. In past versions, it would also reset non-empty tables to the highest value plus 1, but that is no longer true.

(°v°)
0
 
LVL 1

Author Closing Comment

by:max7
ID: 31467435
So it's not so straightforward after all - I don't feel as bad now!  Thanks to all of you for the excellent guidance.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question