Hi All.
I created condition for form when fields are empty the button is disable. But it works in case with one field. When user enter data in one of the field button become enable. I would like that button become enable only when all fields was filled up. And button is disable when user open form or new record and value of the fields is NULL or empty. Where is my problem?
Thanks.
I created condition for form when fields are empty the button is disable. But it works in case with one field. When user enter data in one of the field button become enable. I would like that button become enable only when all fields was filled up. And button is disable when user open form or new record and value of the fields is NULL or empty. Where is my problem?
Code:
Private Sub txtField1_BeforeUpdate(Cancel As Integer)
If (IsNull(Me.txtField1.Value) Or (Me.Field1.Value = "")) Then
Me.cmdCreate.Enabled = False
Else
Me.cmdCreate.Enabled = True
End If
End Sub
Private Sub Field2_BeforeUpdate(Cancel As Integer)
If (IsNull(Me.Field2.Value) Or (Me.Field2.Value = "")) Then
Me.cmdCreate.Enabled = False
Else
Me.cmdCreate.Enabled = True
End If
End Sub
Private Sub Field3_BeforeUpdate(Cancel As Integer)
If (IsNull(Me.Field3.Value) Or (Me.Field3.Value = "")) Then
Me.cmdCreate.Enabled = False
Else
Me.cmdCreate.Enabled = True
End If
End Sub