RuralGuy AWF VIP Local time Today, 13:42 Joined Jul 2, 2005 Messages 13,825 Feb 21, 2009 #21 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
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
boblarson Smeghead Local time Today, 12:42 Joined Jan 12, 2001 Messages 32,059 Feb 21, 2009 #22 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.
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.
RuralGuy AWF VIP Local time Today, 13:42 Joined Jul 2, 2005 Messages 13,825 Feb 21, 2009 #23 Good catch Bob. Duh!