Bind a date null to textbox

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.
 
R

Richard T. Edwards

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top