Update Query

  • Thread starter Thread starter JF Bouthillier
  • Start date Start date
J

JF Bouthillier

Hi all,

I have a problem with an Update Query... The query takes
a field that users fill in but as soon as they enter the
character ", the query fails. This is because it thinks
it is the end of the update string.

Do you have any suggestions?

Thanks.
JF
 
Hi JF,

I believe that you can fix this by using the replace
function to replace the double quotes in your field with
two double quotes. When constructing strings, a double
double quote is interpreted as a single double quote
embedded in the string.

So, I think you should be able to use:
Replace([YourField],"""","""""")

in place of the field value in your string
concatenation. Note that the search character evaluates
to a single double quotation (surrounded by quotation
marks), and the replace string evaluates to two double
quotations (again surrounded by quotation marks)in VBA.

post back if that doesn't work.

-Ted Allen
 
Back
Top