title: Replacing double quotes within Access concatenation code
body: <p>I'm using <a href="http://allenbrowne.com/func-concat.html" rel="nofollow noreferrer">Allen Browne's concatenation code</a> in my Access database. It works well, except for the fact that some of my primary keys contain a single double-quote. This double quote throws off the SQL string being passed to the procedure, and I get <strong>Access Error 3075</strong> (missing operator) on the rows containing the quote. Here is an example of the output:</p>
  
  <pre><code>route              cables
  1769               P006, P007
  1769               P008, P009
  4" DRILL           [blank]
  </code></pre>
  
  <p>The error occurs on the 4" DRILL line.</p>
  
  <p>My VBA is the same as Allen's. My SQL:</p>
  
  <pre><code>SELECT tblVia_Routing.[route], 
  ConcatRelated("[cable]","tblVia_Routing","[route] = """ &amp; [route] &amp; """") AS cables
  FROM tblVia_Routing;
  </code></pre>
  
  <p>Any advice on how to escape the double quote used to denote inches? I've tried a REPLACE in the SQL, but could not get it to work.</p>