Reset Auto Number

aussie

Registered User.
Local time
Tomorrow, 04:44
Joined
May 27, 2012
Messages
47
Hi,
I have set up a database and tested the forms etc to make sure they are working.

When I did this, the Invoice Number (Auto Numbers - Indexed) went up to 6, because I entered 6 invoices.

How do I reset the AutoNumber back to 0:banghead:
 
Delete it and save, then add it back in.

AutoNumber is not good for Invoice Numbers.There is no guarantee that it will be sequential.

Try Using DMax plus 1
 
Hi Rain,
Can you describe what you mean by DMax plus 1?
Thanks
 
Search Access Help for "DMax"

It finds the highest value.

You can then add to the result, so if DMax = 15 plus 1 = 16 etc.

You can also search for the Max Number of a Type. If you had

Cat 12
Cat 13
Dog 89
Dog 90

DMax would give for Cat 14 and Dog 91

Attached is a sample.
 

Attachments

There is another way and that is to created a Data Definiton query . example :-
Alter Table tablename Alter Column RecordId Counter (1,1)
 
@ypma

There is a good reason why Rain advised OP not to use Autonumber for Invoice Number. One can reset an Autonumber by numerous means, but that is not what OP should do here.
 
There is another way and that is to created a Data Definiton query . example :-
Alter Table tablename Alter Column RecordId Counter (1,1)
 
@Spikepl. I Accept you valid comments however, Aussie asked how he could reset the counter to zero and surly if that what he requested my reply gave him an extra option to consider, and in no way was it intended to counter or undermine the professional advise given..
 
To reset Autonumber, you need to delete the current records from the table, and then compact and repair the database.
 
after all of this - if you are trying to use autonumbers to maintain an intact sequence - you cannot.

you need a different mechanism to using autonumbers.
 
@Spikepl. I Accept you valid comments however, Aussie asked how he could reset the counter to zero and surly if that what he requested my reply gave him an extra option to consider, and in no way was it intended to counter or undermine the professional advise given..

Do we or do we not answer the question as asked.

That is the question.

I personally like to set a person in the right direction.

I do get annoyed when a person answers a question that will lead to further problems.

AWF is for learning. So sometimes we have to train the trainer and not offend.
 
Many questions asked here are asked by not very experienced users. Some questions are Access-equivalents to asking instructions for how to remove the protective cover to allow the user to plug the fingers into the wall outlet.

In such instances I believe that it is better to provide an alternative solution rather than a step-by-step instruction for how to do that.
 
I hate it when I have to teach someone to use a Mouse.

Worse still is when they don't know a Mouse exists.
 
@RainLover

Search Access Help for "DMax"

It finds the highest value.

You can then add to the result, so if DMax = 15 plus 1 = 16 etc.

You can also search for the Max Number of a Type. If you had

Cat 12
Cat 13
Dog 89
Dog 90

DMax would give for Cat 14 and Dog 91

Attached is a sample.

Based on this information, if Cat 13 was deleted and DMax was applied would it come back with Cat 13, again?
 
Based on this information, if Cat 13 was deleted and DMax was applied would it come back with Cat 13, again?

Yes it would.

But if 12 was deleted it would leave a Gap.
 

Users who are viewing this thread

Back
Top Bottom