 <p>I use this function on all field assignments that may contain ' </p> <pre><code>Function EscapeQuote(ByVal msData As Object) As String Return (Replace(msData, "'", "''")) End Function e.g. values ('" &amp; EscapeQuote(TextBox1.Text) &amp; "')" </code></pre>