Disable textbox

G

Guest

How to disable Textbox if is selected some value in Combo Box...

Example:
I have Combo1 with many values.
If select value "House" in this combo, Text1 must be disabled.

Thanks!
 
G

Guest

In the After Update event of the combo:

If Me.MyCombo = "House" Then
Me.TextBox.Enabled = False
End If
 
D

Douglas J. Steele

To ensure that the textbox gets re-enabled when something other than House
is selected, you probably want

If Me.MyCombo = "House" Then
Me.TextBox.Enabled = False
Else
Me.TextBox.Enabled = True
End If

although I prefer

Me.TextBox.Enabled = (Me.MyCombo <> "House")
 

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

Similar Threads


Top