It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Basic combo boxes

Moderator: dafunkymunky

Basic combo boxes

Postby jackdarippa on Sun Jul 12, 2009 10:08 am

hi there,

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.
Example:
the databse contains
ID Town
1 Sydney
2 Canberra

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.
jackdarippa
 
Posts: 4
Joined: Sun Jul 12, 2009 9:24 am

Re: Basic combo boxes

Postby Keithuk on Sun Nov 29, 2009 12:58 pm

This appears to be a double post. I've commented in your other one. :wink:
User avatar
Keithuk
 
Posts: 11
Joined: Fri Jun 01, 2007 11:16 am
Location: Staffordshire, England


Who is online

Users browsing this forum: No registered users and 0 guests