atadbitslow
Programmer
Hi,
I have a form where a user can enter a name to search for and another form opens with the results of the search. The search does not work if a name that is being searched has an apostrophe, such as O'Leary and I know it's because I don't have the syntax correct in the code below, but I can't seem to figure it out. Thanks for your help!
.Source = "SELECT timage.* " _
& " FROM timage " _
& " WHERE InStr(Keywords, '" & Forms![search options].searchtext & "') > 0 "
I have a form where a user can enter a name to search for and another form opens with the results of the search. The search does not work if a name that is being searched has an apostrophe, such as O'Leary and I know it's because I don't have the syntax correct in the code below, but I can't seem to figure it out. Thanks for your help!
.Source = "SELECT timage.* " _
& " FROM timage " _
& " WHERE InStr(Keywords, '" & Forms![search options].searchtext & "') > 0 "