AutoNumber

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Hello,
I know the Autonumber field is a Longinteger. I have a situation where I'll
be periodically deleting all rows in a table that has an Autonumber field
and then re-inserting new rows...probably about 1600+ at a time. I don't
need to keep up with the Autonumber value, but was wondering what will
happen if/when I reach the max of this Lontinteger type. Will Access wrap
back around to 1?
If this will cause a problem, can someone tell me how to set a Autonumber
starting value to 1...I've tried following the Access help but it is very
confusing and incomplete.
Thanks
 
The autonumber should be used for the purpose of obtaining a unique number
only. The maximum value is pretty high... possible hard to reach, so don't
worry about it. If you need a 'counter' or a record identifier, then after
you clean the table, you could start your own numbering, which you may get
by using
NextNumber = DMax("[field]","Table")+1


--
Victor Delgadillo [MVP Access]
Miami, Florida

Consultas al grupo, asi todos nos beneficiamos.

_
 
The autonumber should be used for the purpose of obtaining a unique number
only. The maximum value is pretty high... possible hard to reach, so don't
worry about it.

2147483647, and about 60 years or so at adding one record per second.
Then it wraps around to -2147483648 and starts counting up toward 0
for another 60 years... <g>
 
Make sure you compress the database after you delete. That frees up the
deleted numbers for reuse. It also reduces the size of the database and
speeds things up.
 
Back
Top