Prevent Combobox duplicates-VBForums
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,169

    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 06:41 AM.
    Keith

    I've been programming with VB for 17 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
    Location
    Los Angeles, Univ. of Southern California
    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
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    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 06:48 AM.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.