I am having problems with the apostrophe in the SQL search string. Using "O'Mally's Apples" as an example. Following is my current VBA code that is giving me the problem.
MySearch = Replace(Me.TextSearch, "'", "''")
MySearch = "*" & MySearch & "*"
LineThree = "WHERE ((([GLItems].Item) Like '" & MySearch & "'))" & vbNewLine
MyCriteria = LineOne & LineTwo & LineThree & LineFour
If I search for "O'Mally's" the query returns (blank)
If I search for "mally" it returns O'Mally's Apples
I can't just remove all of the apostrophe in the database.
I am at my limit.
Please HELP...