I have a txtDateIn and txtDateOut and chkActive fields on a form.
What im trying to do is make the chkActive field true if txtDateout is null. I tried the following but it not as neat as I would like.
Basically when ever the dateout field is null I need the check box ticked and visa versa. I use the active value in queries.
Private Sub txtDateIn_AfterUpdate()
If Me.txtDateIn = "" Then
Me.ChkActive = 0 'true
Else
Me.CkActive = -1 'false
End If
End Sub
Private Sub txtDateOut_AfterUpdate()
If Me.txtDateOut = "" Then
Me.ChkActive = -1 'False
Else
Me.ChkActive = 0 'true
End If
End Sub
Any Suggestions
What im trying to do is make the chkActive field true if txtDateout is null. I tried the following but it not as neat as I would like.
Basically when ever the dateout field is null I need the check box ticked and visa versa. I use the active value in queries.
Private Sub txtDateIn_AfterUpdate()
If Me.txtDateIn = "" Then
Me.ChkActive = 0 'true
Else
Me.CkActive = -1 'false
End If
End Sub
Private Sub txtDateOut_AfterUpdate()
If Me.txtDateOut = "" Then
Me.ChkActive = -1 'False
Else
Me.ChkActive = 0 'true
End If
End Sub
Any Suggestions