Results 1 to 6 of 6

Thread: Combobox problem?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16
    I'm trying to set properties for what happens when I select an item from a combobox. Right now I have it set up like this:

    Code:
    dadada
    Private Sub cmbLenstype_Change()
     If cmbLenstype.Text = "Bitoric" Then
       txtItemcode.Show
     End If
    End Sub
    But it doesn't work. I'm trying to make a textbox appear as soon as the option 'Bitoric' is selected in the combobox.
    Please help!

    You can probably tell I'm new at this by the elementary level of my past few posts. ^_^

    thx,
    tainc
    Full Contact Coding-
    The greatest way of life!

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    Ummm...

    Just realized I forgot to get rid of the 'dadada'.
    It's not part of the code. Pls ignore.

    thx!
    Full Contact Coding-
    The greatest way of life!

  3. #3
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    Instead of using the Combo_Change event, use the Combo_click, and then use something like this:

    Code:
    Private Sub Combo1_Click()
    If Combo1.List(Combo1.ListIndex) = "Text1" Then
        Form2.Show
    End If
    
    End Sub

  4. #4
    Lively Member
    Join Date
    Jul 2000
    Posts
    104
    The change event fires when text is typed into the combobox. The click event fires when you choose an item from the list.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    Smile Oh, ok!

    Oh, I get it. Thanks for the clarification!

    -tainc
    Full Contact Coding-
    The greatest way of life!

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Location
    Atlanta
    Posts
    16

    Ummm..

    Anyone have any ideas for getting the information into an email, like I described? Or know a place with a tutorial that might cover it?
    Full Contact Coding-
    The greatest way of life!

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