B
Bruce M. Thompson
DoCmd.RunSQL ("UPDATE PROP SET n_rue = '" & Replace(rs1("rue"), "'", "''") &
It appears that you could simply replace each embedded single quote (') with a
double double quote (""), so:
.... would become ...
("UPDATE PROP SET n_rue = """ & Replace(rs1("rue"), """",
.... and so on.
"', n_rueno = " & rs1("rueno") & " WHERE RUE = '" & Replace(rs1("rue"), "'",
"''") & "' AND RUENO = " & rs1("rueno"))
The problem arives if the street (ie. "rue") called is , for example, "de
l' Astrolab". I have tried various functions (including the built in
'replace' function, used above) , but none seems to work. Acording to the
error message, the problem is eminating from the "WHERE" part of the SQL
statement (the error message refers to a "Syntax" problem, error number
3144, etc).
It appears that you could simply replace each embedded single quote (') with a
double double quote (""), so:
("UPDATE PROP SET n_rue = '" & Replace(rs1("rue"), "'",
.... would become ...
("UPDATE PROP SET n_rue = """ & Replace(rs1("rue"), """",
.... and so on.