title: How to include a variable when creating a new table through vba in MS-ACCESS
body: <p>In my latest system design i came into a problem with the following idea:</p>
  
  <p>I wanted to create a new table from the click of a button in a form, but i want the table to get it's name from the <code>nrof</code> variable that must get its value from a text field in the form, what i am trying right now, based on actual microsoft documentation is the following:</p>
  
  <pre><code>Private Sub Submit_Click()
  
  Dim num As Integer
  Dim nrof As Integer
  Dim dbs As Database
  
  Set dbs = CurrentDb
  num = Nr_Motores.Value
  nrof = PF.Value
  
  
      ' Create a table with three fields and a primary
      ' key.
      dbs.Execute "CREATE TABLE NewTable " _
          &amp; "(FirstName CHAR, LastName CHAR, " _
          &amp; "SSN INTEGER CONSTRAINT MyFieldConstraint " _
          &amp; "PRIMARY KEY);"
  End Sub
  </code></pre>
  
  <p>The <code>CREATE TABLE</code> part is copy/pasted from the documentation, no changes were made yet, I don't know how to include that variable in the name of the table</p>