The code is creating an update query ("sSQLforUpdate") that update table 1
from the current form (that bounded to table 2).
It is working ok, up until there is a special char such as " ' " in the
string that need to be updated (sSQLforUpdate).
For example:
The word "Hello" will be update ok, but the word "Hell'o" will create an
error that wouldn't let me run the query.
I've by pass it be using a "remove_Char" function, but I need to find a way
to update information that includes also this " ' " sign.
Do you know how do I need to write the sql in order to over come this problem?
Thank you
--
Alu_GK
If you use single quotes as a delimiter and the value you include in the
string has a single qoute, you will get the error. For exampe, assume the
control txtWorld = Hell'o
This will cause the error:
strSQL = "UPDATE SomeTable SET MyField = '" & Me.txtWorld & "'"
However, if you use two double quotes where the single qoutes are in your
assignment, it will correctly delimit the string:
strSQL = "UPDATE SomeTable SET MyField = """ & Me.txtWorld & """"
"Alu_GK" <Al...@discussions.microsoft.com> wrote in message
news:478DA762-5B7F-459E...@microsoft.com...
I talked about this in my May, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access". You can download the column (and sample
database) for free at http://www.accessmvp.com/djsteele/SmartAccess.html
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Klatuu" <david....@realpage.com> wrote in message
news:eQQOXjgO...@TK2MSFTNGP04.phx.gbl...
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Alu_GK" <Al...@discussions.microsoft.com> wrote in message
news:D6EB2803-F215-47C5...@microsoft.com...