Results 1 to 3 of 3
  1. #1
    SCFM is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Feb 2010
    Posts
    13

    Combo Box without repeated values


    Hi There!
    I have a simple table with two fields: Company and State. I have about 100 rows of data. I need to create a form with a combo box (to select one state) and a button to get a query with only the rows of the selected state. Easy isn't it? Now here is the key thing: if I scroll the combo box, I should read all the different states WITHOUT repetition. Actually when I scroll down the combo box, I read 100 values of states (some of them repeated of course). Thank you very much!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Either

    SELECT DISTINCT State
    FROM TableName

    or

    SELECT State
    FROM TableName
    GROUP BY State
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Feb 2010
    Location
    London, UK
    Posts
    21
    Or if you used a query then group on the state. Then bind the query to your combo box.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums