title: VBA docmd.opentable + variable table name
body: <p>I am very new to VBA. I managed to get my head around Powershell and have worked in SQL for years. But this is the most frustrating language!</p>
  
  <p>I have a Form where a user specifies a source from a combo box.</p>
  
  <p>I then have a macro which should lookup a table and a query based on what the use puts in.</p>
  
  <p>So far i have the table name I want in a variable. I want to pass this to docmd.opentable</p>
  
  <p>But have not figured it out :(</p>
  
  <pre><code>    Dim str_DeltaTable As String
  
      str_DeltaTable = DLookup("Table_Delta", "QC_Report_List", "Source = '" &amp; Forms!Main_Form!Source_ComboBox.Text &amp; "'")
  
      DoCmd.OpenTable "str_DeltaTable" 'Some help here would be ace
  </code></pre>
  
  <p>Thanks from a newb</p>
  
  <p>Rich</p>