Results 1 to 4 of 4

Thread: [RESOLVED] "other" in combo box

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    7

    Resolved [RESOLVED] "other" in combo box

    Hi! I'm a VB noob but was wondering if you guys could help me with this simple problem.

    I have created a combo box and when the user clicks 'other' i want a text box to appear where they can type in something. I have made the combo box and the text box already & ive set the text box to invisible at form load.

    Any help would be much appreciated!
    Last edited by Hack; Apr 23rd, 2006 at 06:42 AM. Reason: Add RESOLVED to thread title and green resolved checkmark

  2. #2
    Hyperactive Member Bearnerd's Avatar
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    290

    Re: "other" in combo box

    Just add a line of code to make your textbox visible again.

    VB Code:
    1. Private Sub Form_Load()
    2.     If Combo1 = "Others" then
    3.          Text1.Visible = True
    4.     ElseIf ..... Then
    5.          'Another action
    6.     Else
    7.          'Another action
    8.     End If
    9. End Sub

  3. #3
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: "other" in combo box

    Hi GmanGman

    Try this:

    VB Code:
    1. Private Sub Combo1_Click()
    2.     If Combo1.Text = "other" Then
    3.         Text1.Visible = True
    4.         Text1.SetFocus
    5.     End If
    6. End Sub
    Last edited by Keith_VB6; Apr 22nd, 2006 at 03:26 PM. Reason: formatted
    Keith_VB6

    If you have any further questions, just ask.
    If this solves things, then please mark the thread resolved.
    [Thread Tools] --> [Mark Thread Resolved]

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    7

    Re: "other" in combo box

    Thanks guys. A real help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width