-
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!
-
Either
SELECT DISTINCT State
FROM TableName
or
SELECT State
FROM TableName
GROUP BY State
-
Or if you used a query then group on the state. Then bind the query to your combo box.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules