PDA

Click to See Complete Forum and Search --> : two entrys in a combobox


bimsel
Aug 11th, 2000, 05:54 AM
hi,

in access i can specify the datasource for a combobox like:
datasource = Select fruit, price from all group by fruit, price order by fruit;
and Rows = 2. then i get both, the fruit and the price in one combobox. its looking like this :
APPLE | 1.99
STRAWBERRY | 2.49
and so on.
is this also possible in VB ? i tried the ComboBox, the DBCombo and the DataCombo but i donīt get it. can someone please help me?


thanks broesel

honeybee
Aug 11th, 2000, 06:30 AM
I don't think it is possible in VB directly. If you just want to have it, you have to manually construct strings where each string contains the values of the two/more fields combined, and then add these strings into the combo box.

If you want details of how to do it, you can ask me (Just mention what you want in the email, though).

Hope it helps...

bimsel
Aug 11th, 2000, 06:53 AM
thanks for your reply, honeybee

but the problem is, that iīm "working" with the selected, so if i would add the strings together i have to split them befor i can send the selected string to the database. there must be an easyer way,i hope.

-bimsel