Re: Rs.Filter = " Author = ' " & StrVariable & " ' " Dont work when StrV
It's just to demonstrate what meant by Steve :
Function ParseQuotes(sText as string ) as string
ParseQuotes = Replace(sText, "'", "''")
StrVariable = ParseQuoates(StrVariable)
Rs.Filter = " Author ='" & StrVariable & "'"
"Steve Stubbs" <email@example.com> wrote:
>The single quote in O'Donell is causing the filter property to fail. You
>must parse any text containing a single qoute (apostrophe) and substitute
>TWO single quotes for it. O'donell would become O''donell.
>"Williams" <firstname.lastname@example.org> wrote:
>>Rs.Filter = " Author = ' " & StrVariable & " ' " Dont work when StrVariable
>>is O'Donell for example
>>How a make this query?
>>If i use " in the filter property do not work
>>An error appear:
>>Arguments are of the wrong type, are out of acceptable range, or are
>>in conflict with one another.
>>I'm query a MSDE server (it's like SQL server 7.0 engine I´supose)
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center