I'm wanting to add data from a recordset into a list box in VB6. I do not want to use the actual ADO controls properties to set this. I want to do it all in VB code. ( Ex.. lstName.additem {Item} {key} )
My question is, how can I add a second column in the list box next to each name. For example if I want to pull 'Name' and 'Phone Number' from a database. I want to be able to display both feilds in the listbox, and have the listbox's value equal to the phone number when they select an item. I only know how to add 'Name'.
Thanks !
Comments
:
: My question is, how can I add a second column in the list box next to each name. For example if I want to pull 'Name' and 'Phone Number' from a database. I want to be able to display both feilds in the listbox, and have the listbox's value equal to the phone number when they select an item. I only know how to add 'Name'.
:
: Thanks !
:
Use a listview control instead. Add items and subitems this will give you what you need
Hope this helps
John ;-)