Access 97

  • Thread starter Thread starter MClifford
  • Start date Start date
M

MClifford

can anyone help me? I am using access97 and the auto
numbering keeps jumping at least 10 numbers at a time, it
does not happen very often but with the data base being of
high importance it can be a nuisance. Please help......
 
Hi,


If it is important to control the sequence, do not use autonumber. Use
1+DMax( ) , or something like that (assuming you enter the data through a
form, not directly in the table). 1+DMax( "fieldName", "tableName" ) supply
1 + the maximum value already present, so, you control the sequence. Be sure
you add an index not allowing duplicated values.

Even with multiple users entering data, at least, an error would occur for
one of the two users try to enter a new record at the same time, and for the
one having the error (trap it in the form OnError event), just recompute the
1+DMax and try to save the record again.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top