×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Make corresponding text box enabled/disabled based on selection?

Make corresponding text box enabled/disabled based on selection?

Make corresponding text box enabled/disabled based on selection?

(OP)
I have a combo box with a list of options to choose.  If the option is not there they can choose "other".  If other is choosen then I would like a text box next to it be abled so they can input what other is.  Otherwise, the other box should be disabled unless other is selected.

Any help?

Thanks
Kurto

RE: Make corresponding text box enabled/disabled based on selection?

if you VBA you could do the following on the comboBox's AfterUpdate event try...

Private Sub MyComboBox_AfterUpdate()
  Me.MyTextBox.Enabled = False
  If Me.MyComboBox = "Other" Then Me.MyTextBox.Enabled = True
End Sub

let me know if this helps

RE: Make corresponding text box enabled/disabled based on selection?

(OP)
That definetly helped and worked - Thanks.  

Now my problem is getting that info to update correctly.  I have made a dummy text box that is my control source for the field.  The combo and "other" text box (depending on which is selected) dump the value into my dummy text box.  Logically this sounds like it would work but it is not.  I am using a value list to populate my combo & I think that is the problem?

RE: Make corresponding text box enabled/disabled based on selection?

i'm not certian that i got the 2nd post.

you've got the following (depending on "other" selection)

Combox-------|
                    |-------> DummyTextbox
OtherText----|

if this is correct then ... when i do something like this i skip the control source thing & update dummyTextbox from the Combobox or OtherText's afterUpdate event. for me it's the most direct way of getting things done

but maybe i misunderstand

anyway...

i should tell you that you could skip the otherText box altogether because you don't have to limit selections to what's on the drop down list... it's a textbox/dropDownListbox combo... so users either type their selection or choose from the list all in one control

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close