Autonumber -Reset to a lower number

G

Guest

I have an autonumber field which is the primary key linked to other tables. I want to set the autonumber field to a lower number i.e I started at 90000 and and now have exceeded 99999, six digits wont work for me. I want to reset to 50000. I have tried the append method, but the autonumber still increments from the highest number 100004
 
J

John Vinson

I have an autonumber field which is the primary key linked to other tables. I want to set the autonumber field to a lower number i.e I started at 90000 and and now have exceeded 99999, six digits wont work for me. I want to reset to 50000. I have tried the append method, but the autonumber still increments from the highest number 100004

I'd suggest that you not use an Autonumber for this purpose.
Autonumbers have one purpose, and one purpose ONLY: to provide an
(almost, except for occasional bugs) guaranteed unique identifier.
They are not editable and (as you can see) not readily controlled.

You might want instead to use a Long Integer field and use one of the
many VBA routines available to increment it. What is the largest value
currently in your table? Do you have a gap available in which to
insert numbers? What do you want to do with record 100003?
 
J

Joseph Meehan

Mike said:
I have an autonumber field which is the primary key linked to other
tables. I want to set the autonumber field to a lower number i.e I
started at 90000 and and now have exceeded 99999, six digits wont
work for me. I want to reset to 50000. I have tried the append
method, but the autonumber still increments from the highest number
100004

I agree with John. You are trying to use autonumber for something not
intended. There are some work arounds that might do what you want, but it
is far better to never use an autonumber where the user is going to see it.
It should be used for internal (to Access) only.
 

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

Top