0

Hi

i have a form where i have 2 comboboxes and a couple of textboxes.

I have set the datasource property to the table and fields as required for all the textboxes and the combobox

The first combobox (cbCriteria) contains the column names of the table and the second combobox (cbSearchCust) contains the data in the fields which are shown according to the criteria selected from the previous combobox (Cust_id, Cust_name or Cust_sname)

I want to connect the cbSearchCust to the textboxes so that when i change the customer from the textbox, the textboxes change. How can i do this?

Thanks
Luke

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by lukis
0

Can't you do something like:-

Dim MyVariable As String
MyVariable = ComboBox1.Text

TextBox1.Text = MyVariable

?

0

Thanks for your help but I managed to fix it myself.

i'm attaching the code just in case some other problem pops up you might redirect them to this thread.

write this code in the cbSearchCust_selectedindexchanged sub

me.databinding(dataset, "table").Position = cbSearchCust.selectedIndex

this code will change all your textboxes

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.