vb 2005 combo box

syntax101

New member
Joined
Apr 7, 2008
Messages
1
Programming Experience
3-5
VB 2005
im using two combo box and i bind the two

(cb_dailyplanter and cb_dailyhacienda)
-cb_dailyplanter-contains the list planter name
-cb_dailyhacienda-contains the list of hacienda name

whenever i change the cb_dailyplanter the data of the cb_dailyhacienda changes, it depends which planter owns the hacienda

ex.

planter ------------hacienda
henry--------------Ahacienda
-----------------Bhacienda
my problem is i want to get the primary key of hacienda not the hacienda_name (Ahacienda,Bhacienda)

this is the table

hac_num -------hac_name
1-----------------Ahacienda
2------------------Bhacienda

how to get the primary key of the table if the hac_name(hacienda name is displayed on the combo box)
 
your post doesnt quite make sense..

with combos we normally bind them to a 2 column list, one is the DisplayMember, one is the ValueMember. did you see those properties?
 

Latest posts

Back
Top