G
Guest
Hi,
I was struggling with that until I saw this posting.
I used to replace any apostrophe with a question mark (wildcard for a single
character), then use "Like" in my criteria, for example: "[Lastname] Like '"
& replace(myString,"'","?") & chr(39).
But it's not 100% safe.
Thanks to this posting, I searched the section "Quotation Marks in Strings"
in the Access VBA help and got a detailed explanation of Tim's and Gunny's
useful answer.
Thanks
I was struggling with that until I saw this posting.
I used to replace any apostrophe with a question mark (wildcard for a single
character), then use "Like" in my criteria, for example: "[Lastname] Like '"
& replace(myString,"'","?") & chr(39).
But it's not 100% safe.
Thanks to this posting, I searched the section "Quotation Marks in Strings"
in the Access VBA help and got a detailed explanation of Tim's and Gunny's
useful answer.
Thanks