finding quotes in a field

  • Thread starter marnita Florence via AccessMonster.com
  • Start date
M

marnita Florence via AccessMonster.com

Hi all,

Is there a way to find quotes in a field and replace them with single quote?

Please advise.
 
J

Jeff Boyce

Marnita Florence

Have you already tried using the Edit | Find/Replace menu choice?

Jeff Boyce
<Access MVP>
 
M

marnita Florence via AccessMonster.com

Thank you for responding so quickly. And to answer you question, yes I did
try search and replace. However, I couldn't get the search to find the
quotes. I used (like "*""*" ) to find all items with a quote, but I can't
find a way to replace those quotes with a singe quote.
 
F

fredg

Hi all,

Is there a way to find quotes in a field and replace them with single quote?

Please advise.

Permanently replace them?
Access 2002 or newer?
Run an Update query.

Update YourTable Set YourTable.[FieldName] =
Replace([FieldName],"""","'")

For clarity that's ," " " "," ' ")

Access 2000 also has the Replace() function but depending upon
version, you may need to place it in a wrapper user defined function,
then call it from the query.
 
J

Jeff Boyce

Marnita

I just opened a table in Access, selected Edit | Find, entered a single
quote (') in the Find What field, changed the Match field to "Any part of
field" and found a record containing an embedded single quote (O'Brien, in a
LastName field).

How are you trying to do it?

Jeff Boyce
<Access MVP>
 
Z

Zadok @ Port of Seattle

Nita,
I ran a query with criteria for my field as such:

Like []

When the dialog box opens enter *"*
This should give you all records containing a " in them, then you can do a
find/replace as you like.
Zadok
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top