Steve Leferve wrote:
Hey folks -
I have a field that is a number. For new records, I want it to default to
the highest value of that field +1. What is the syntax for the default
value?
Steve Lefevre
If an autonumber's no good for you (and it's no good for anyone but the
machine!!!) then don't ever use a default value in this way, two people
open the form and add a record they'll get the same number, horrendous
results.
Use a BeforeUpdate procedure, e.g.
(air code)
Sub Form_BeforeUpdate(Cancel As Integer)
If isnull(MySeqNo) Then
MySeqNo = Nz(DMax("MySeqNo","MyTable"),0)+1
end if
End Sub
--
But why is the Rum gone?