Click to See Complete Forum and Search --> : DT Picker Control


ranjit
October 3rd, 1999, 08:14 AM
Can i assign a null value to the dt picker control .ie in effect clear the contents of the DT Picker control

Andrew
October 9th, 1999, 09:58 AM
You can assign the DTPicker a value of 0. This will work for time but I am not sure about date.

e.g.

DTPicker1.Value = 0#

works when the DTPicker style is set to Short or Long Time.

I'm not sure about how you would assign a similar value to a date.

Hope that helps.

Andrew

Bruno
October 9th, 1999, 04:00 PM
You can assign null value (meaning - date is not set), but your picker must have checkbox:

private Sub Form_Click()
DTPicker1.CheckBox = true
DTPicker1.Value = null
End Sub

private Sub DTPicker1_Change()
If Not IsNull(DTPicker1.Value) then
Caption = DTPicker1.Value
else
Caption = "date is not set"
End If
End Sub