Restart autonummering

Johny

Registered User.
Local time
Today, 15:40
Joined
Jun 1, 2004
Messages
80
How can I tell Access to restart the autonummering if my table is empty. The autonummering field is the primary key of the table.

I guess you now are all wondering why the hell I want Access to restart the nummering... Well, it's just an informing question because the users can see the autonummering field when they create a new order and they will think that there were already 500 orders before when they start ordering.
 
if you're running Access 97 try the compact and repair, i remember someone on the forum saying that it will work. if not how about deleting your field and re-creating it ... it should do the trick, however, do it on a backup database first just to be on the safe side.
 
When you compact a database, each autonumber field per table resets to the first possible number after the last.

If a table has one record with an autonumber set at 45453 then the next number will be 45454.

If a table is empty, it will start from 1 - unless an explicit starting point or a random autonumber has been set.
 
When you compact a database, each autonumber field per table resets to the first possible number after the last.

Did not know that. Cool...

Johny - This may cause problems down the line with users assuming this is a record count type field. I usually seed an autonumber to start at 1000 or some other number so that it's less likely the user will make an erroneous assumption...

kh
 
Thanx for the replies all, you're all so helpfull. What a service the users get over here :p

When you compact a database, each autonumber field per table resets to the first possible number after the last.
This did the trick. It was so damn easy :)

@ KenHigg,I think I'll follow your advice because the autonumber serves as a reference number the client will use to refer to an Assignment they filled in.

Johny
 

Users who are viewing this thread

Back
Top Bottom