Update Query

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
 
T

Ted Allen

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
 

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

Similar Threads

Disconnect - Please help! 3
Counting multiple memberships 1
Windows XP Vulnerabilities 1
Update Queries and Record Locks 3
Update Query 2
Subforms 1
Access Open Form with WhereCondition 6
Multiple Queries 1

Top