Hi I need some help over here… how do i change the display member of a ComboBox after i have entered a code in a textbox that it represent the combobox value??
example
Code: 02-001 Combobox: Provider X
if i change the code the provider combobox must change and if i change the provider combobox the code should change!.. i haven’t found any help.. heres little code I remember
if e.keychar = chr(13) Then
combobox.valuemember = textbox.text
combobox.displaymember = me.stockdataset.selectprovider(@textbox.text)
end if
this code change the combo box display member but if I change the comobox by clicking it the code on the textbox doesnt change, to its corresponding code…??
please help
….the combo box is bound to the provider tables….
This is wrong binding way….This is how you do it:
I have simulate your case by a simple form with a combobox and a textbox
and a datatable with 2 columns “Code” and “Description”
and here the Code (if you please, dont forget to mark my answer as Right):
So when you enter “Code3” and hit Enter or Click the TextBox1, the ComboBox1 will display “Desc3”