-
Populate combo in code
I populate a combobox with the following code (taken from Karl Moores great book).
This puts the description in the combo e.g "Dell PC" but I want to know how I can put the field "ItemID" in the combo as Value member property. I need to search on ID but view description.
For i = 1 To objdataset.Tables("tblItems").Rows.Count
strCurrentID = objdataset.Tables("tblItems").Rows(i - 1).Item("ItemDescription")
cboOwners.Items.Add(strCurrentID)
Next
Can anyone Help?
Thanks in Advance
-
You can add values as with the treenode by creating your own class.
See the code here
http://hunterstone.com/library/SubC...SamplesBody.htm
-