I getting hung up on using the FindFirst method when I attempt to located a name with quotes. For example:
Dim str as String
str = "O'Reilly"
rs.FindFirst "[Customer] = '" & str & "'"
I tried:
rs.FindFirst "[Customer] = '" & Replace(str,"'","''") & "'"
but it doesn't work.
It keeps returning a syntax error despite me using the Replace function. What am I doing wrong? Can anyone help?
Thanks.
Dim str as String
str = "O'Reilly"
rs.FindFirst "[Customer] = '" & str & "'"
I tried:
rs.FindFirst "[Customer] = '" & Replace(str,"'","''") & "'"
but it doesn't work.
It keeps returning a syntax error despite me using the Replace function. What am I doing wrong? Can anyone help?
Thanks.