Im creating a filter/search for a datagridview in VB. I have a two comboboxes and one textbox. combobox1 selects a field, combobox 2 selects criteria, textbox is for values. After I select my field and criteria and enter in my value, I hit a Go button and run the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.TblSpeedStudyBindingSource.Filter = "select * from tblSpeedStudy where " & "'" & ComboBox1.SelectedItem & "' " & "'" & ComboBox2.SelectedItem & "' " & TextBox1.Text & " "
End Sub
I get a syntax error: Missing operand after 'tblSpeedStudy' operator.
Anyone know what I'm doing wrong?