PDA

Click to See Complete Forum and Search --> : Quotes in Findfirst string


Caro
Jan 23rd, 2000, 04:14 PM
Is it possible to find a record on an Access database when the name you are looking for contains an apostrophe? E.g. St Mary's Bakers. I am doing a search on Customer name and get a runtime error 3077 whenever there is an apostrophe.
I am using Findfirst with the name as a string.

Clunietp
Jan 23rd, 2000, 10:23 PM
All single quotes must be replaced with 2 single quotes (NOT a double quote) before submitting it for processing:

example: O'Brien must equal O''Brien for it to work

You can use VB6's REPLACE function to do this for you as well

Tom

[This message has been edited by Clunietp (edited 01-24-2000).]