1.11M Members

bind combobox to value in textbox

 
0
 

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....

 
0
 
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        Me.TextBox.Text = ComboBox1.SelectedValue
    End Sub
 
0
 

hello !
i think you want to show the related records of given code in textbox in combo and then if you change the value of combo then want to show the related code in textbox, am i right ?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: