display the text in the textbox based on combobox

gouthamsworld

Member
Joined
Oct 22, 2007
Messages
7
Programming Experience
1-3
hi in access we can display the fields of a table in the textboxes based on the selection in "combobox"
how to achieve this in VB.NET????

can someone help?


thank you
 
do you mean you just want a textbox on your form to show you the text that is displayed on a combobox, also on that form??

Why would you want to do that if the text is already displayed on the combobox?

Anyway, if you want to do it, use the ComboBox_TextChanged event and add:

me.yourTextBoxName.text = me.yourComboBoxName.text



EDIT: Just reread what you said, I think I got confused. Do you mean you want to display all records from a table based on what is selected in the combobox? I.E. Customer combobox, select CustomerA, show all Orders for CustomerA , select CustomerB, show all Orders for CustomerB ??

If that's what you want, you need to create a parameterised query on your TableAdapter (FillBy) that parameterises what you have your ComboBox based on.

You then simply call this FillBy command on the change of text in the combobox to display all the records for that selection.
 
Back
Top