easy one for you gurus

GetReel

Registered User.
Local time
Today, 17:20
Joined
May 22, 2003
Messages
67
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
 
If Me.txtDateIn = "" or isnull(Me.txtDateIn) Then

???
ken
 
thanks dude
 
Why do you need a checkbox to do this, you can just add an unbound textbox if you want a visual indicator of the records status?
 

Users who are viewing this thread

Back
Top Bottom