Access 97

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......
 
M

Michel Walsh

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
 

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