J
JK
If a user enters a date in a date field, check a check box. For some reason I
cannot make this work. I have every other variation working except this one.
If a user checks the "Inactive" check box, today's date is automatically
inserted into the "DateFinished" field. If a user unchecks the check box, the
"DateFinished" field is cleared. If there is a date in the "DateFinished"
field and the check box is checked and a user clears the date in the
"DateFinished" field the check box is automatically unchecked. However, like
I said, if there is no date in the "DateFinished" field and the check box is
unchecked and a user enters a date in the "DateFinished" field I cannot make
the check box automatically check for some reason. Any help would be
appreciated.
Private Sub DateFinished_AfterUpdate()
If IsNull(Me.DateFinished Or Me.DateFinished = "") Then
Me.ckInactive = False
Else
If Not IsNull(Me.DateFinished Or Me.DateFinished > 0) Then
Me.ckInactive = True
End If
End If
End Sub
Private Sub ckInactive_AfterUpdate()
If (Me.ckInactive = True) Then
Me.DateFinished = Now()
Else
If (Me.ckInactive = False) Then
Me.DateFinished = ""
End If
End If
End Sub
Regards,
Jason
cannot make this work. I have every other variation working except this one.
If a user checks the "Inactive" check box, today's date is automatically
inserted into the "DateFinished" field. If a user unchecks the check box, the
"DateFinished" field is cleared. If there is a date in the "DateFinished"
field and the check box is checked and a user clears the date in the
"DateFinished" field the check box is automatically unchecked. However, like
I said, if there is no date in the "DateFinished" field and the check box is
unchecked and a user enters a date in the "DateFinished" field I cannot make
the check box automatically check for some reason. Any help would be
appreciated.
Private Sub DateFinished_AfterUpdate()
If IsNull(Me.DateFinished Or Me.DateFinished = "") Then
Me.ckInactive = False
Else
If Not IsNull(Me.DateFinished Or Me.DateFinished > 0) Then
Me.ckInactive = True
End If
End If
End Sub
Private Sub ckInactive_AfterUpdate()
If (Me.ckInactive = True) Then
Me.DateFinished = Now()
Else
If (Me.ckInactive = False) Then
Me.DateFinished = ""
End If
End If
End Sub
Regards,
Jason