Reset a auto number field

N

Nuno Gomes

Hello,


I have a autonumber field in a table.
I need to "reset" that auto number. What i mean is my field have already the
numbers 1, 2, 3, ...

I'm using AC97.

Does anyone know it to do this?...




Thanks,


Nuno Gomes
 
K

KARL DEWEY

If you are wanting to reset the number to 1 you can not. Autonumbers are
unique so tou can not have two number ones.
 
L

Lord Kelvan

well there is this

ALTER TABLE TableName ALTER COLUMN AutoNumFieldName COUNTER(iMaxID,1);

from the kb article

http://support.microsoft.com/kb/884185

but that dosnt work in access 97 ^_^

regardless you shouldnt do it anyways because you are only supose to
use auto number for primary keys and primary keys are not supose to
have any beering on your data apart form identifing the record ie.
just a random number. for god know what reason (most likly bordom) i
was reading

http://www.mvps.org/access/tencommandments.htm

realising after translating the old english that i knew all of that
but

number 7 is

Thou shalt not use Autonumber if the field is meant to have meaning
for thy users.

and then i realised the mvp's have too much time on their hand but
what DBA dosnt.

so the only reason you want this to happen is you either have built
your table wrong or you missunder stand what a primary key is most
likly because of the former reason.

Regards
Kelvan
 
N

Nuno Gomes

The reason i want this is not because i buit my table wrong or nothing like
that...
Is only because i develop an app in access and want to distribute to my
users, so i want the autonumber began on number 1.

But, while i was read the posts i had an ideia and it works!!!

Simple delete the auto number fields from the table. Save. And add again the
autonumber.
The access will number the field stating in 1, 2, 3, ...



Regards,

Nuno Gomes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top