1,105,384 Community Members

bind combobox to value in textbox

Member Avatar
DNHK
Newbie Poster
2 posts since May 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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....

Member Avatar
kingsonprisonic
Posting Whiz in Training
265 posts since Nov 2009
Reputation Points: 42 [?]
Q&As Helped to Solve: 54 [?]
Skill Endorsements: 0 [?]
 
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
Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: