title: Combining a variable and part of a control in VBA
body: <p>I have a subform which could be different depending on a user choice (as they are make table queries).  Consequently I have had to store the actual table name in a variable caled MyResultSO.  This works fine and returns the correct table name.  I am then trying to get the value of a field from the subform.  I am then trying to combine the variable with the field name.text to get the value of the field from the subform but can't get the syntax correct.</p>
  
  <p>I have tried variations but, for example here is one:</p>
  
  <pre><code>MyResultSO = Me.RESULTS.SourceObject 
  'this works fine and returns "Table.POWER PRICES Query Table 3"
  
  MyProductCode = MyResultSO &amp; !PRODUCT_CODE.Text  
  'which is where I am trying to combine the value of variable MyResultSO and the field which is PRODUCT_CODE.Text.
  </code></pre>
  
  <p>Combined this should return the value of the current record from the following: </p>
  
  <pre><code>Table.POWER PRICES Query Table 3!PRODUCT_CODE.Text.
  </code></pre>
  
  <p>As you will probably tell from the above, I am not very experienced with VB.</p>