Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible apostrophe problem 2

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I get an error on this line:

rsQryTop3A.FindFirst ("strName = '" & rsTbl3A.Fields("strName") & "'")

when the name O'Grady passes through. I have tried to modify the line with previous replace statements but being or appearing so different to this, I'm stuck. Thanks
 
Code:
rsQryTop3A.FindFirst ("strName = """ & rsTbl3A.Fields("strName") & """")


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
How about:

rsQryTop3A.FindFirst ("strName = '" & Replace(rsTbl3A.Fields("strName"),"'","''") & "'")
 
Many thanks for the quick response. Both versions worked perfectly, thanks again, good weekend.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top