Bind a date null to textbox

  • Thread starter Thread starter SilviaLl
  • Start date Start date
S

SilviaLl

Hello,

I've a textbox binded with a date field. The problem is when I clear the
textbox the old value is set.
In the parse event:

Select Case sender.control.FieldType

Case TipusCampBdD.TBdDDateTime Or TipusCampBdD.TBdDSmallDateTime

If e.Value IsNot DBNull.Value Then

If e.Value = "" Then e.Value = DBNull.Value

End If

End Select

Could you help me???



Thanks for all,



SilviaLl.
 
Try doing this in the text change event. Since that's what's being fired
when the text changes.
 
Back
Top