A
APH
Hi I am using the following code to update a record:
CurrentProject.Connection.Execute "Update tblSWPurchases SET
[LicenceeName] ='" & LName & "'WHERE [SWPurchaseId]=" & SWID
LName is a public variable and contains a text string. occassionally
however, the text string itself contains an apostrophe (eg St Gabriel's)and
when it does I am getting a syntax error.
Other than going through 2500 records removing the apostrophies, can anyone
suggest a way round the issue. I guess I need some more quote marks in my
syntax, but not sure where
thanks
Alex
CurrentProject.Connection.Execute "Update tblSWPurchases SET
[LicenceeName] ='" & LName & "'WHERE [SWPurchaseId]=" & SWID
LName is a public variable and contains a text string. occassionally
however, the text string itself contains an apostrophe (eg St Gabriel's)and
when it does I am getting a syntax error.
Other than going through 2500 records removing the apostrophies, can anyone
suggest a way round the issue. I guess I need some more quote marks in my
syntax, but not sure where
thanks
Alex