autonumber reset

G

Guest

Is there some way to reset an autonumber field in Access Basic? If I can't
do that then the field will eventually reach the maximum value, and
presumably crash.
 
J

Jeff Conrad

in message:
Is there some way to reset an autonumber field in Access Basic? If I can't
do that then the field will eventually reach the maximum value, and
presumably crash.

If you delete all the records from the table and then Compact the database
the autonumber will reset. This assumes you have the latest Jet version.
Some versions had a bug with this.

I sincerely doubt that you will ever exceed a maximum for Autonumber
values since they can also go negative. The range I believe is:
-2,147,483,648 to -2,147,483,647 Should be plenty.

More to the heart of the matter. If you care in any way shape or form
what the *actual* value of the Auntonumber field is, then you are
misusing its function. This violates Commandment number 7 of
the Access Ten Commandments:

http://www.mvps.org/access/tencommandments.htm
http://www.accessmvp.com/djsteele/AccessTenCommandments.html

Autonumber is just supposed to guarantee (almost) a unique record
identifier; that's all.
 
M

Marshall Barton

waynemb said:
Is there some way to reset an autonumber field in Access Basic? If I can't
do that then the field will eventually reach the maximum value, and
presumably crash.


Nonsense! ;-)

Since you should never let user's see an autonumber field,
there is no need to be concerned about what value the field
has.

An Autonumber field is a long integer, which can have over 4
billion different values. That has got to be more records
than you could ever create. It's certainly more than an MDB
file can hold.
 
V

Van T. Dinh

".... The range I believe is:
-2,147,483,648 to -2,147,483,647 Should be plenty."

The above range has only 2 numbers even if you choose inclusive range.
Plenty??? <g>

--
HTH
Van T. Dinh
MVP (Access)



news:%[email protected]...
 
J

Jeff Conrad

in message:
".... The range I believe is:
-2,147,483,648 to -2,147,483,647 Should be plenty."

The above range has only 2 numbers even if you choose inclusive range.
Plenty??? <g>

DOH!!!
<slapping forehead with hand>

Must be why the OP reached the limit!
:-/
 

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

Reset autonumber 1
AUTONUMBER reset 7
delete autonumber memory 2
Restarting AutoNumber 5
Access 5
Autonumber fields in MS Access 6
AutoNumber Reset 1
How can i customize Autonumbers in Access? 4

Top