Question text box null (1 Viewer)

alekkz

Registered User.
Local time
Yesterday, 16:22
Joined
Oct 14, 2016
Messages
27
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
 

Ranman256

Well-known member
Local time
Yesterday, 19:22
Joined
Apr 9, 2015
Messages
4,337
IIF is ONLY for queries:

Code:
if isnull(txtCn) then
 iNum = DMax([Control Number], "Log_tbl")+1
endif
 

Users who are viewing this thread

Top Bottom