I have looked through other threads here and have come further along in my search function dilemma, but need someone to look at this code:
I have created an unbound textbox on my switchboard called txtFind and created a command button called cmdFind. In the On Click Event, here is my code:
Me.RecordSource = "SELECT * FROM Master Table " & "WHERE CompanyName LIKE '*" & txtFind & "*'"
When I type in a company name and click the command button, I get a Run Time Error '3131' saying there is Syntax Error in the FROM clause.
Does anyone know how I can get this to work?
For those who did not read my previous posts, I am trying to create a search function on my switchboard so that people can type in a company name and it will bring them to the corresponding record in the Master Form.
I have created an unbound textbox on my switchboard called txtFind and created a command button called cmdFind. In the On Click Event, here is my code:
Me.RecordSource = "SELECT * FROM Master Table " & "WHERE CompanyName LIKE '*" & txtFind & "*'"
When I type in a company name and click the command button, I get a Run Time Error '3131' saying there is Syntax Error in the FROM clause.
Does anyone know how I can get this to work?
For those who did not read my previous posts, I am trying to create a search function on my switchboard so that people can type in a company name and it will bring them to the corresponding record in the Master Form.