hi,

I link up a combobox item with a MS access database by setting the data source and display member of combobox properties. However, I wish to filter some repeated item in the combobox, how can I do that?

For example, my MS access table contain value as follow:

profile name| Operator| wallpaper
1.MotoZ8 | Singtel | water lilies
2.MotoZ8 | StarHub | Sunset
3.MotoZ10 | Singtel | blue hills

after set the data source and display member(profile name) of my combobox to link up with the MS access table, now my combobox display the following item :MotoZ8,MotoZ8 and MotoZ10.

Now the problem is I can't filter away the repeated item, I wish my combobox only display distinct item,in this case only display MotoZ8 and MotoZ10. How can I do this? I m using Visual C++ 2005 express edition.

Pls help me. Million thanks.

Regards,

Adrian

Recommended Answers

All 2 Replies

Any idea? I still unable to solve this problem....thanks

Instead of doing a direct link with the database why don't you write an SQL query in which you can filter the data any way you want then fill the combo box with the result set.
SELECT DISTINCT profile_name will remove duplicates

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.