selectedtext of the comboobox

hello
i have a combobox and its datasource is a dataset which contains two columns Id and Name,and a textbox,i place in the combobox the name in the dataset
i need when the user select the name from the combobox then the name will appear in the textbox,ihave try this:
me.textbox1.text=me.combobox1.selelectedtext
thank you for the time and for the help


Answer this question

selectedtext of the comboobox

  • Nestor Pira

    'frist you have to show right colomn in your database
    combobox1.datasource = vt1dataset
    combobox1.displaymember = "name"
    combobox1.valuemember = "name"
    'and

    textbox1.text = combobox1.selectedvalue

    if you want to show other data from your combobox or textbox you can change displaymember and valuemember. Displaymember is what you wanna see on combobox; valuemember is what you wanna show in your textbox.


  • selectedtext of the comboobox