M
Michael T
I have a simple SQL string that is run from a form when a field is updated:
strSQL = "UPDATE tblDesign " & _
"SET " & strFieldNameForUpdate & " = '" & strDM & "' " & _
"WHERE DesignName = '" & strName & "' ;"
It works fine except for where there is (rarely) an apostrophe in the
strName field data. I cannot work out how many extra quotes to put into the
sql build string to get round this.
A debug.print of the string that causes a syntax problem is:
UPDATE tblDesign SET DesignMonarchSide = 'M' WHERE DesignName = 'Sailor's
uniform' ;
Help would be appreciated.
All the best,
Michael.
strSQL = "UPDATE tblDesign " & _
"SET " & strFieldNameForUpdate & " = '" & strDM & "' " & _
"WHERE DesignName = '" & strName & "' ;"
It works fine except for where there is (rarely) an apostrophe in the
strName field data. I cannot work out how many extra quotes to put into the
sql build string to get round this.
A debug.print of the string that causes a syntax problem is:
UPDATE tblDesign SET DesignMonarchSide = 'M' WHERE DesignName = 'Sailor's
uniform' ;
Help would be appreciated.
All the best,
Michael.