I have the following code for filling a DataGrid.
Dim myString As String = "SELECT * FROM Report WHERE ShiftID = 'Yellow'"
Dim myDA As OleDbDataAdapter
Dim myDS As New DataSet
myDA = New OleDbDataAdapter(myString, OleDbConnection1)
myDA.Fill(myDS)
DataGrid1.DataSource = (myDS)
it works fine. What I would like to do is have the user fill in a text box and be able to replace 'Yellow' with a shift of thier choice. I tried
Dim mySearch as String
mySearch = shiftTextBox.text
Then replacing the 'Yellow' in the first code with 'mySearch'. It returns nothing however. Any ideas?
Dim myString As String = "SELECT * FROM Report WHERE ShiftID = 'Yellow'"
Dim myDA As OleDbDataAdapter
Dim myDS As New DataSet
myDA = New OleDbDataAdapter(myString, OleDbConnection1)
myDA.Fill(myDS)
DataGrid1.DataSource = (myDS)
it works fine. What I would like to do is have the user fill in a text box and be able to replace 'Yellow' with a shift of thier choice. I tried
Dim mySearch as String
mySearch = shiftTextBox.text
Then replacing the 'Yellow' in the first code with 'mySearch'. It returns nothing however. Any ideas?