I know there are several threads dealing twith this issue but i must have mised something.
Am trying to change my database for Autonumber to finding the next highest No using the following code
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.txtNumberField = DMax("[complaint No]", "customer contact") + 1
End Sub
Compaint No being the feild and Customer Contact being the form.
have put the code in as an event before update
I have set the feild in the tabel to Number from Autonumber type.
what am i doing wrong please as this does not seem to work.
Cheers
Paul
Am trying to change my database for Autonumber to finding the next highest No using the following code
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.txtNumberField = DMax("[complaint No]", "customer contact") + 1
End Sub
Compaint No being the feild and Customer Contact being the form.
have put the code in as an event before update
I have set the feild in the tabel to Number from Autonumber type.
what am i doing wrong please as this does not seem to work.
Cheers
Paul