Default value "the previous value +1"

That should not have compiled. No '=' required.
Code:
Private Sub Customer_No_BeforeUpdate(Cancel As Integer)
   If Me.NewRecord Then
      [Customer_No] = DMax("[Customer_No]", "Customers") + 1
   End If
End Sub
 
Actually that is in the wrong spot. It should be in the FORM_BeforeUpdate event NOT the CONTROL BeforeUpdate. That is your problem as it isn't adding the number in like it should.
 
Good catch Bob. Duh!
 

Users who are viewing this thread

Back
Top Bottom