Results 1 to 6 of 6

Thread: Prevent Combobox duplicates

  1. #1

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    Prevent Combobox duplicates

    I know how to search both a listbox and a combo box for duplicate entries and remove them.

    What I would like to do is prevent a duplicate from ever getting entered in the first place.

    How would I do that?
    Beantown Boy
    Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,238

    Re: Prevent Combobox duplicates

    MartinLiss has answered this, do a search for duplicates listbox

    http://www.vbforums.com/showthread.php?t=354651&
    Last edited by Keithuk; Nov 18th, 2005 at 07:41 AM.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  3. #3

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    Re: Prevent Combobox duplicates

    I did...I couldn't find anything.

    Maybe I just wasn't using the right search criteria.

    I'll try again.
    Beantown Boy
    Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Prevent Combobox duplicates

    Quote Originally Posted by SeanK
    I know how to search both a listbox and a combo box for duplicate entries and remove them.

    What I would like to do is prevent a duplicate from ever getting entered in the first place.

    How would I do that?
    could you provide some more information. from where are these values coming?

    BTW, while entering a value in the box, check it in the list of values in the listbox or combobox.
    Show Appreciation. Rate Posts.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Prevent Combobox duplicates

    Is the combo initially being loaded from a database table but your customers can add entries and you want to check to make sure they none of them already exist?
    Last edited by Hack; Nov 18th, 2005 at 07:48 AM.

  6. #6

    Thread Starter
    Frenzied Member SeanK's Avatar
    Join Date
    May 2002
    Location
    Boston MA
    Posts
    1,160

    Re: Prevent Combobox duplicates

    Quote Originally Posted by Hack
    Is the combo initially being loaded from a database table but your customers can add entries and you want to check to make sure they none of them already exist?
    Yes, exactly.
    Beantown Boy
    Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.

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