It's just to demonstrate what meant by Steve :

Function ParseQuotes(sText as string ) as string
ParseQuotes = Replace(sText, "'", "''")
End Function


Sub Demo()
....
....

StrVariable = ParseQuoates(StrVariable)

Rs.Filter = " Author ='" & StrVariable & "'"

....
....
End Sub


SLJ


"Steve Stubbs" <stevestubbs@hughesautomation.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.
>
>Steve
>
>
>"Williams" <apterous@hotmail.com> 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:
>>
>>Err 3001
>>
>>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)
>>
>>Thank.
>>Williams
>>

>