G
Guest
Hi Everyone
I have data entry form with check box named "completed". I'd like this check
box to be active only if all other text boxes have value in them. So on
Current Event I've placed some if statemnts. My problem is that it works at
first, but then it stops and my check box is not active at all.
Here is thee code
Private Sub Form_Current()
If IsNull(Me.TimeBack) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.TimeOut) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.txtMilageIn) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.txtMilageOut) Then
Me.chkCompleted.Enabled = False
Else
If (Me.txtServiced.Value = 0) Then
Me.chkCompleted.Enabled = False
Else: Me.chkCompleted.Enabled = True
End If
End If
End If
End If
End If
End Sub
I'm just starting with VB, please help.
Barb
I have data entry form with check box named "completed". I'd like this check
box to be active only if all other text boxes have value in them. So on
Current Event I've placed some if statemnts. My problem is that it works at
first, but then it stops and my check box is not active at all.
Here is thee code
Private Sub Form_Current()
If IsNull(Me.TimeBack) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.TimeOut) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.txtMilageIn) Then
Me.chkCompleted.Enabled = False
Else:
If IsNull(Me.txtMilageOut) Then
Me.chkCompleted.Enabled = False
Else
If (Me.txtServiced.Value = 0) Then
Me.chkCompleted.Enabled = False
Else: Me.chkCompleted.Enabled = True
End If
End If
End If
End If
End If
End Sub
I'm just starting with VB, please help.
Barb