Results 1 to 5 of 5

Thread: [RESOLVED] Access excluding repeats in combo boxes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    29

    Resolved [RESOLVED] Access excluding repeats in combo boxes

    This is probably something really easy that I'm just overlooking, but, in a form that I have there are combo boxes that are populated by previously used answers, and each time an answer is used it gets added to the combo box, so the next time you go to enter something, it will say the same thing 2 times, and so on and so on. Is there a way to have access exclude these from the combo box, without removing their entrys from the list? Thanks in advance!

  2. #2

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    29

    Re: Access excluding repeats in combo boxes

    anybody?

  3. #3
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Access excluding repeats in combo boxes

    this "correct" answer assumes you are populating the combobox choices from an underlying table or query(which you should be doing)


    Try editing the sql that populates the combo box directly in the rowsource property. It should say something like this:
    Select xx from xx where etc etc etc
    Change it to this:
    Select Distinct from xx where etc etc etc

    The "Distinct" keyword is what is needed here. It tells the sql server ignore duplicates.
    Last edited by Lord Orwell; Jun 14th, 2007 at 08:22 AM.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4

    Thread Starter
    Junior Member
    Join Date
    May 2007
    Posts
    29

    Re: Access excluding repeats in combo boxes

    THANK YOU!!!! worked perfectly!

  5. #5
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] Access excluding repeats in combo boxes

    the best thanks is a vote! Unfortunately they don't count unless you have 20 posts or more, mr. 19 posts, But i was glad to help anyway.
    Last edited by Lord Orwell; Jun 14th, 2007 at 11:47 PM.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

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