L
Leslie Isaacs
Hello All
I have the following code which works fine until I have a value for recip
that contains an apostrophe:
DoCmd.RunSQL "INSERT into tblEMailLogs " & _
"(txtEmailFrom,txtEmailTo,dteSend,txtAttachments,intPrint) " & _
"Values (" & "'" & from & "'" & "," & "'" & recip & "'" & "," & _
Format(Now(), "\#mm\/dd\/yyyy hh\:nn\:ss\#") & "," & "'" & _
attachments & "','1'" & ")"
When the value of recip is
John.O'(e-mail address removed)
I get Run-time error 3075
Syntax error (missing operator) in query expression "John.O'Driscoll
I can see what's causing this, but not how to fix it!
Hope someone can help.
Many thanks
Les
I have the following code which works fine until I have a value for recip
that contains an apostrophe:
DoCmd.RunSQL "INSERT into tblEMailLogs " & _
"(txtEmailFrom,txtEmailTo,dteSend,txtAttachments,intPrint) " & _
"Values (" & "'" & from & "'" & "," & "'" & recip & "'" & "," & _
Format(Now(), "\#mm\/dd\/yyyy hh\:nn\:ss\#") & "," & "'" & _
attachments & "','1'" & ")"
When the value of recip is
John.O'(e-mail address removed)
I get Run-time error 3075
Syntax error (missing operator) in query expression "John.O'Driscoll
I can see what's causing this, but not how to fix it!
Hope someone can help.
Many thanks
Les