Ok, i have a sql database in my vb2010 express app, and it has 5 tables. On my form i have added a combobox and a textbox (multiline).
On the right of my form i have added 5 radio controls so i can choose which table i want to view/edit.I have successfully managed to bind the combobox with which ever table i choose:
ComboBox2.DataSource = TableNameBindingSource
ComboBox2.DisplayMember = DataSetName.TableName.ColumnName.ToString...the problem i have encountered is trying to populate the textbox in the same way. I need to bind the text property to a column in the table i choose.
The above code is added under each radiobutton_checkchanged event, with the table names being different in each.
I tried googling and found this:
TextBox1.DataBindings.Add("text", TableNameBindingSource, "ColumName")
...but this produces and error as the compiler says i am trying to bind to the textbox twice, but i can't figure out how!
Am i going about this all wrong, or am i just doing something wrong?
Any help much appreciated!
H.I.T
Done! Cleared the textbox before re-binding to the next table.
Where is everyone....???????
H.I.T
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |