I'm afraid you're going to have problems if you want to create a filter with a string which contains BOTH single and double quotes.
To include the string delimiter inside a quoted string, it must be doubled; if your string can contain both you must pick one as the delimiter and make sure all occurrences of it are doubled.
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
Hi Tony. Unfortunately, We still use Access97 here and it doesn't recognize the replace function. I may have to write some additonal code to perform a search for a double quote and to change it to a single quote. Thanks for the help.
There are several postings of code here to provide Replace functionality in Access 97 - I just did a quick search and this is the first one I found: thread701-792701, check out the post by member Golom
PH,
Using Chr(34) won't help in this case as the problem is with the re-interpretation of the built string when used as a Filter - it doesn't matter how you get it into that string provided that, when it's there, it's doubled up.
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.