Im currently trying to implement a search function into my program, form is as shown in attachment. I am using a data environment with a command that has a relationship to my car table and an sql statement as shown below
SELECT * FROM Car WHERE car_registration_plate LIKE '" & TxtSearch.Text & "*'
I then have the code below for the command button oviously nothing shows in the datagrid to begin with but when text is entered and the search button clicked it should show the record from the text that is entered, when i change the txtsearch bit in the code above to a record in my table it shows that record in the datagrid upon form load up, so i dont know why it doesnt show it when the text is entered
Search command button
Private Sub cmdsearch_Click()
Dim strSearch As String
Dim SQLString As String
DataGrid1.Refresh
End Sub
Can anyone help, iv been trying to solve it for hours