Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

autonumbering

Status
Not open for further replies.

Dimst

Technical User
Sep 17, 2002
70
NL
Hi,

maybe a very simple question, but i haven't figured out how to answer it....

I have a couple of records in one table, the last number (done by autonumbering) = 220, when entering a new record the new number will of course be 221.

But when testing and deleting number 221, there are only 220 records (also when looking in the table).

How comes that access still continues with 222 when adding a new record to the table?

I'm using access 2000 and the adding and deleting of records is done by a button in a form.

Please don't laugh :)

-Dims

"Wearing sunglasses won't help taking my brightness away"
 
Do not use autonumber for incremental numbers, it will not work, as you have found out. Autonumber can only be depended on to be unique, after that it may be very large, jump about, or be negative. If you want a number for the user, build one and keep autonumber for the programme/r.
 
Thanks Remou,

I noticed that :)

I am the programmer and the testing is done by me...unfortunately apparantly i cannot reset the autonumbering, so i will have to do it with missing numbers. It does not matter though, i just wondered if it were possible.

Thanks anyway.



-Dims

"Wearing sunglasses won't help taking my brightness away"
 
It is possible to reset autonumbers, but in general this should only be done with Compact & Repair before releasing the database to the client. Once the database goes live, autonumber is not unlikely to jump all over the place, especially if you have more than one user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top