July 12th, 2009, 06:13 AM
Basic combo boxes
i am adding a combox box to a visual basic application.
currently im using the .additem("somestring") method, but i was wondering if there is a way to add a
value and a number. (like in web programming) ie if the combox box is populated by a database can it
have the an index value (thats not displayed) that is the id in the database and the actual display
value as the string which the ID corresponds to.
the databse contains
I want the list to display Sydney and Canberra, but when i retrieve what value was selected im only
interested in the ID, ie 1 and 2.
I would also like to carry this behaviour to checkboxes.
Can anyone shed some light on this?
Thanks in advance.
July 12th, 2009, 09:15 AM
Re: Basic combo boxes
combo1.itemdata(combo1.newindex) = 1
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.