Hello and happy Cinco De'Mayo!
I have a fairly simple form that uses the BeforeUpdate event to execute thecode below.
----Access 2010----
--------------------------------------------------------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
If RecordsetClone.RecordCount = 0 Then
Me.IDNumber = "1"
Else
Me.IDNumber = DMax("val([IDNumber])", "Details") + 1
End If
End If
End Sub
--------------------------------------------------------
That part works perfectly for new...
DMax on existing record to increment serialized # fails
I have a fairly simple form that uses the BeforeUpdate event to execute thecode below.
----Access 2010----
--------------------------------------------------------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
If RecordsetClone.RecordCount = 0 Then
Me.IDNumber = "1"
Else
Me.IDNumber = DMax("val([IDNumber])", "Details") + 1
End If
End If
End Sub
--------------------------------------------------------
That part works perfectly for new...
DMax on existing record to increment serialized # fails