Can i assign a null value to the dt picker control .ie in effect clear the contents of the DT Picker control
Printable View
Can i assign a null value to the dt picker control .ie in effect clear the contents of the DT Picker control
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
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