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

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