G
Guest
In VB6 I used to load a comb or listbox in the following fashion
snRecordset is a recordset from a table
Do Until snRecordset.eo
combobox1.additem snRecordset![LName
combobox1.ItemData(combobox1.NewIndex) = snRecordset![ID
snRecordset.movenex
Loo
Then when the user selected the combo box I could pass the combobox1.ItemData(combobox1.ListIndex) value to a parameter for a query. Doing it this way would allow me to query on an Unique ID versus a last name that could have the same value. For example, if you pass the Text property there could be 3 Smiths
What's the equivelent in VB.NET
Thanks in advance
Davi
snRecordset is a recordset from a table
Do Until snRecordset.eo
combobox1.additem snRecordset![LName
combobox1.ItemData(combobox1.NewIndex) = snRecordset![ID
snRecordset.movenex
Loo
Then when the user selected the combo box I could pass the combobox1.ItemData(combobox1.ListIndex) value to a parameter for a query. Doing it this way would allow me to query on an Unique ID versus a last name that could have the same value. For example, if you pass the Text property there could be 3 Smiths
What's the equivelent in VB.NET
Thanks in advance
Davi