Results 1 to 8 of 8

Thread: combo box

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    Wink

    Hope somebody can help me with this problem.
    I have a combo box selection for user. It contents for eg.:
    A
    B
    C
    When user clicks and selects, say, "B", it will be selected and when the user selects from the same combo box again, the following is listed
    A
    B
    B
    C
    The item "B" appears twice in the combo list. If user selects "B" again, it will then appear three times in the list.
    How do I prevent this from happening and get the original combo list?

    Thanks & Regards.

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    refresh

    not sure what you are doing but just clear your combo and then call your load combo process again
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    I'd check the code in your Combo_Change() procedure if I were you. If anything is being added to the Combo list, that's where it's happening from. According to what you've said above.

  4. #4
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136

    Uhhh....

    I meant Combo_Click().

    Sorry, I'm stupid. I was born that way and it's got progressively worse.

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb Just use Combo1.Additem

    All you need is just add another item into the combobox and make sure you jave set the Sorted properties to True

    Code:
    Combo1.Additem Combo1.Text

  6. #6
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    Chris,

    I think he was trying to STOP this from happening!

  7. #7
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Re: Just use Combo1.Additem

    Originally posted by Chris
    All you need is just add another item into the combobox and make sure you jave set the Sorted properties to True

    Code:
    Combo1.Additem Combo1.Text
    Oh!...Sucks, I miss out the most important line. So just forget the my previous post. Why not you just set the ComboBox style to Dropdown List?

  8. #8

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    Smile Thanks

    Thanks guys for all your help and suggestions. Really appreciate it. As suggested by Chris, I tried setting style to Dropdown List, but same problem still occurs.

    I have decided to instead convert from using combo boxes to using list box. Think that will solve my problem?

    Thanks again!

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