Topic: SELECT DISTINCT(data) in a combobox

HI!

I'm trying to display in a combobox the three different options of a column in a database, but it displays the same three options a lot of times, without making distinction.

2 (edited by derek 2017-07-14 20:36:24)

Re: SELECT DISTINCT(data) in a combobox

Hi Benjamin,
If you have relationships set up between tables, this shouldn't happen.
If, however, you only have one table or you have tables with no relationships, you can still populate your own combobox with distinct values from the column you are interested in.
However, doing it this way, I've found that you need to add a small extra step which is to then copy the distinct value you have selected from your combobox into an edit field.  You then use the contents of the edit field in your search.   Maybe others know of a different way to do it.
Anyway, please have a look at the attached example and hopefully this helps,
Regards,
Derek.

Post's attachments

Attachment icon benjamin.zip 337.29 kb, 353 downloads since 2017-07-14