Run code when text box content deleted

S

Sandy

I am trying in vain to have the following run when the value of a text box
becomes ""

If txtDateReady = "" Then
Me.lblWhyDelayed.Visible = False
Me.txtWhyDelayed.Visible = False
End If

I have tried in 'txtDateReady_LostFocus' and 'txtDateReady_Change' but
nothing happens.
Help appreciated.

Sandy
 
R

Rick Brandt

Sandy said:
I am trying in vain to have the following run when the value of a
text box becomes ""

If txtDateReady = "" Then
Me.lblWhyDelayed.Visible = False
Me.txtWhyDelayed.Visible = False
End If

I have tried in 'txtDateReady_LostFocus' and 'txtDateReady_Change' but
nothing happens.
Help appreciated.

Sandy

Use AfterUpdate and test for Null not "".

If IsNull(txtDateReady) Then...
 
Top