Hi guys!
Does anybody here has an idea of what seem to be the problem with this code?
Private Sub txtSearch_Change()
Adodc1.RecordSource = "Select * From tblBusMast Where COMMNAME LIKE '" & txtSearch & "%';"
Adodc1.Refresh
End Sub
This code works pretty well but when I came across a string with an (') apostrophe e.g. CARL'S RESTAURANT, I am prompted by a syntax error. Anybody please help!
Does anybody here has an idea of what seem to be the problem with this code?
Private Sub txtSearch_Change()
Adodc1.RecordSource = "Select * From tblBusMast Where COMMNAME LIKE '" & txtSearch & "%';"
Adodc1.Refresh
End Sub
This code works pretty well but when I came across a string with an (') apostrophe e.g. CARL'S RESTAURANT, I am prompted by a syntax error. Anybody please help!