Eduman,
The gaps in the autonumber are normal; in an autonumber field, once a
number is issued it can't be used again if the record is deleted (even
if it the last one). A number is issued (and "spent") even if you just
Esc twice out of a new record in a form.
Autonumbers are not suited for sequential numbering, they are just not
meant for that, they are only meant as unique identifiers. If you
absolutely must have sequential numbering, then (assuming all data entry
is done through a form) the way to go is to use a simple number field
instead, and use an expression on the form to calculate the next
available number, like DMax("[PKField]", "MyTable") + 1. This could be
in the form control's Default value property, or you could use a macro
or some VBA code fired off a form event to set the value. In a multiuser
environment, the timing when this happens is of particular concern, in
that if you use the default value property, if a user starts to enter a
new record the next available number is calculated right as they enter
the new record; so, if another user starts a new record before the first
one has saved theirs, they will end up with the same PK value, so the
second one won't be able to save their record. To avoid this, I would
use an unbound form, and some VBA code behind a Save command button to
add the record, so the next available value can be calculated right
before the saving, rather than when entering the new record in a bound form.
Timing issues like the one I described above are quite likely the reason
why users can't find some records they (beieve they) have created; in
fact, this is much more likely a reason for that than the monolithic
multi-user structure.
That said, under such a scenario (monolithic multi-user) the real danger
is corruption; you may not experience it for a while (sometimes a months
long while!) but eventually it will strike, and when it does so once
then there is no end to it. The bottomline is, you must absolutely split
and give each user their own copy of the front end. If this impossible
(why?) then I strongly suggest you take measures to ensure there are
never more than a single user in the database at any time.
HTH,
Nikos
I have a table setup to list incidents and the primary key is an autonumber
field called indicent number. I have noticed going through the records,
there are missing numbers (ie. there are numbers missing from the sequential
order). The database is currently setup (I know this isn't the best
programming but I have to do it to get around our school system's computer
setup) with the whole database on the server and everyone accessing the whole
database with limited menus. Is this a record lock situation where two
people happen to try to enter a new record at the same time or is this
another issue? Some teachers have told me they entered data and it is not
there. That is how I found the missing numbers.