Thanks John, Would it be to late to change my database as I am up to 380
.............Thanks Bob
Not really. You would need to do several steps - remove any relationships
on
this field; remove this field's Primary Key index; change the datatype
from
Autonumber to Long Integer; reestablish the Primary Key and any
relationships;
and finally add the custom counter VBA code to the form that you use for
data
entry (and yes, you must use a form, tables have no usable events).
For a one user application - or one where it is very unlikely that there
will
be two users adding records concurrently - the custom counter code is
simple.
Use the Form's BeforeInsert event with code like
Private Sub Form_BeforeInsert(Cancel as Integer)
Me!txtBillID = DMax("[BillID]", "[Bills]") + 1
End Sub
where txtBillID is the name of the form textbox bound to BillID, and Bills
is
the name of your table. If you have a multiuser (split, I hope!!)
application,
post back, it's doable with a bit more work.
John W. Vinson [MVP]