title: MS Access - SQL Concatenate works - VBA does not
body: <p>I created a query to concatenate two fields in a table into a third field in the same table.</p>
  <ul>
  <li>Table: <code>[mif_999_sf_item_creation_subcategory_groups]</code></li>
  <li>Field1: <code>[Product_Group_Code__c]</code></li>
  <li>Field2: <code>[Subcategory_Group_Code__c]</code></li>
  <li>Field1&amp;2: <code>[CCat_PrdGrpCd_n_SubCatCd]</code></li>
  </ul>
  <p>The query worked, here is the SQL code:</p>
  <pre><code>UPDATE mif_999_sf_item_creation_subcategory_groups SET mif_999_sf_item_creation_subcategory_groups.CCat_PrdGrpCd_n_SubCatCd = [Product_Group_Code__c] &amp; &quot;_&quot; &amp; [Subcategory_Group_Code__c];
  </code></pre>
  <p>I used <a href="http://allenbrowne.com/ser-71.html" rel="nofollow noreferrer">AllenBrowne's code</a>
  to convert the SQL code to VBA.</p>
  <p>But when I pasted the VBA code into a VBA module and ran it and nothing happened. I did not receive any error messages but neither were the two columns concatenated.</p>
  <pre><code>Sub Test()
  
  strSql = &quot;UPDATE mif_999_sf_item_creation_subcategory_groups SET mif_999_sf_item_creation_subcategory_groups.CCat_PrdGrpCd_n_SubCatCd = [Product_Group_Code__c] &amp; &quot;&quot;_&quot;&quot; &amp; [Subcategory_Group_Code__c];&quot;
  
  End Sub
  </code></pre>
  <p>I tried looking for other examples on the web and on this site but nothing worked for me.</p>
  <p>Any ideas as to what I'm doing wrong?</p>