|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
combo box columns
hi all,
I need to add 2 categories into a combo box, that means i need to have a combo box with 2 columns. I use the recordset method to move the values in the database into the combobox but i can't get the combo box to divide into 2 columns. i need to separate the values into 2 columns because only the item in the 1st column will be the bound value. another thing is, VB 6.0 that i'm using doesn't seems to recognize the word 'column' and 'ColumnCount' although there is an example on the help menu that uses these words. i'm using the code below to get 2 values into 1 row of the combobox but this did not solve the problem on the bound value. qryVar=recset!JobName & " " & recset!JobID ComboBox.AddItem (qryVar) |
|
#2
|
|||
|
|||
|
May be this helps...
ComboBox control do not have th column property! If U want to add two item in the same list in combobox U can use the .ItemData. But it only accept Numbers / Long / Integers. If u'r recset!JobID Type is Number/Long/Integers then Try to use this: Code:
With ComboBox .AddItem recset!JobName .ItemData(.NewIndex) = recset!JobID End With
__________________
I May Have Misinterpret U'r Post Correct Me If I Am Wrong......// Enjoy Coding........................../// zak2zak |
|
#3
|
|||
|
|||
|
Thanks zak2zak,
The job ID type is Text. So I guess I can't use that one....... |
|
#4
|
|||
|
|||
|
There is an example of how to make your own multi-column combo at www.mvps.org/vb
There are 3rd party multi-column combos. I wish the Access combo was available for VB myself ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > combo box columns |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|