Re: DTPicker checkbox event
When the CheckBox is unchecked the Value property becomes Null, so the Click event can still be used.
VB Code:
Private Sub DTPicker1_Click()
If IsNull(DTPicker1.Value) Then
DTPicker1.Value = Now
DTPicker1.Value = Null
End If
End Sub
Re: DTPicker checkbox event
Thanks, but this doesn't work for me. I don't want the date to be set to today when the user unchecks the box, only when they check it.
Any further thoughts?
Re: DTPicker checkbox event
Put the above code in the MouseDown event of the DatePicker.
Re: DTPicker checkbox event
Good solution Bruce. Thanks.