Hello everyone.
I have this form called "LOG_frm" and I need it to give me a custom autonumber every time the form is saved and a new record added. I have no problems getting it to do all this, until today. it started checking for the field where the autonumber goes into to see if its null so I added the following, to try to make it work still but I haven't had luck.
Private Sub Date_In_GotFocus()
iif(isnull(txtCn), DMax([Control Number], "Log_tbl") + 1,"")
End Sub
I don't know if there is anything wrong with this. please help
I have this form called "LOG_frm" and I need it to give me a custom autonumber every time the form is saved and a new record added. I have no problems getting it to do all this, until today. it started checking for the field where the autonumber goes into to see if its null so I added the following, to try to make it work still but I haven't had luck.
Private Sub Date_In_GotFocus()
iif(isnull(txtCn), DMax([Control Number], "Log_tbl") + 1,"")
End Sub
I don't know if there is anything wrong with this. please help