I need some help. I have forms that are performing a lookup based on the text selected in a list box. The SQL statement uses "...WHERE ClientName = " & "'" & lstClient.Text & "'"
This works for all occurences except if a ClientName has an apostrophe in the name itself...the SQL things that it is the end of the string and it gives me a run-time error because it also uses the apostrophe to mark the text. If I remove the surrounding apostrophes, the statement will not work at all.
I need to know how to lookup a string without using the surrounding apostrophes. I have tried several ideas but I am stuck.
I appreciate whetever help you can give! Thanks.
This works for all occurences except if a ClientName has an apostrophe in the name itself...the SQL things that it is the end of the string and it gives me a run-time error because it also uses the apostrophe to mark the text. If I remove the surrounding apostrophes, the statement will not work at all.
I need to know how to lookup a string without using the surrounding apostrophes. I have tried several ideas but I am stuck.
I appreciate whetever help you can give! Thanks.