OK. For anyone looking for this in the future let me tell you how I went about this.
I filled the DataSet with Data From SQL. Bound a ComboBox to the DataSet.
-
txtbox1.text = dataset.tables("table name here").Rows(cbox1.selectedindex).Item("Column name here")
-
-
txtbox2.text = dataset.tables("table name here").Rows(cbox1.selectedindex).Item("Column name here")
-
First issue I ran into was VB sending errors because the first column was yet to be populated so I had to set the index of cbox1 to 0
Then for the selected index chage event
-
If cbox1.selectedindex = -1 then
-
cbox1.selectedindex = 0
-
end if
-
-
txtbox1.text = dataset.tables("table name here").Rows(cbox1.selectedindex).Item("Column name here")
-
-
txtbox2.text = dataset.tables("table name here").Rows(cbox1.selectedindex).Item("Column name here")
-
Thats all there was too it. being a novice I was actually trying to get the data from the Column instead of the Row. "STUPID. Yes.."
If anyone wants to modify and tell of any other way we can make this better I would appreciate it.