Check box to update date field

LeeSmith

Registered User.
Local time
Today, 22:47
Joined
Mar 17, 2006
Messages
27
Hi all

In my current project i'm trying to get a tick box to update a date field with the current date and to revert to 'no date or null'. This is the code I'm currently trying to work with. Query Completed is the tick box and DateQuerySolved is the date field. Can anyone help me with this?

If QueryCompleted = True Then Me.DateQuerySolved = Now()
End If
Exit Sub

If QueryCompleted = False Then Me.DateQuerySolved = Null
End If
Exit Sub
 
Private Sub Form_Current()

Select Case Me.QueryCompleted.Value

Case Is = True
Me.DateQuerySolved = Now()

Case Is = False
Me.DateQuerySolved = Null
End Select
End Sub
 
The following should work for an on event action, if thats any help.

With Me.DateQuerySolved
.Value = (IIf(Me.QueryCompleted = True, Date, ""))
End With
 
Thanks for all your help with this :)
 
Last edited:
The following should work for an on event action, if thats any help.

With Me.DateQuerySolved
.Value = (IIf(Me.QueryCompleted = True, Date, ""))
End With



Neat - I like that.;)
 

Users who are viewing this thread

Back
Top Bottom