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

checkboxes

Moderator: dafunkymunky

checkboxes

Postby jackdarippa on Sat Jul 18, 2009 4:58 am

hi there,

i am adding a checkboxes 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 checkbox 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 to show the words Sydney and Canberra, but when i retrieve what value was selected im only interested in the ID, ie 1 and 2. I take it it would act something similar to the itemdata in combo boxes

Can anyone shed some light on this?

Thanks in advance.
jackdarippa
 
Posts: 4
Joined: Sun Jul 12, 2009 9:24 am

Re: checkboxes

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

jackdarippa wrote:
i am adding a checkboxes to a visual basic application.
currently im using the .additem("somestring") method, but i was wondering if there is a way to add a


Checkboxes don't use AddItem property only ListBoxes and Comboboxes. :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 5 guests