Disable textboxes

  • Thread starter Thread starter anb001
  • Start date Start date
A

anb001

I have three text boxes in a form. As soon as I enter a character in one
of the textboxes, the other two should be disabled. If I then delete
whats in that textbox, so it is 'empty' again, the other textboxes
should be enabled again.

What should I do?
 
Private Sub TextBox1_Change()
TextBox2.Enabled = (TextBox1.Text = "")
TextBox3.Enabled = TextBox2.Enabled
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Back
Top