We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,188 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

bind combobox to value in textbox

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

3
Contributors
2
Replies
17 Hours
Discussion Span
1 Year Ago
Last Updated
3
Views
DNHK
Newbie Poster
2 posts since May 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
kingsonprisonic
Posting Whiz in Training
268 posts since Nov 2009
Reputation Points: 61
Solved Threads: 54
Skill Endorsements: 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 ?

M.Waqas Aslam
Master Poster
745 posts since Aug 2011
Reputation Points: 50
Solved Threads: 121
Skill Endorsements: 2

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0578 seconds using 2.64MB