title: How do I ignore the first column in SQL Insert instruction via Excel VBA?
body: <p>To be more clear,</p>
  
  <p>I have the following table:</p>
  
  <pre><code>+-----------------+--------------+-------------+-------------+
  | ID              | Key          | Region      | Branch      |
  +-----------------+--------------+-------------+-------------+
  | INT PRIMARY KEY | VARCHAR(100) | VARCHAR(50) | VARCHAR(50) |
  +-----------------+--------------+-------------+-------------+
  </code></pre>
  
  <p>I need to insert a new <code>Key</code>, <code>Region</code> and <code>Branch</code>, ignoring the first column ID since it is a <strong>Primary Key</strong>.</p>
  
  <p>I am trying with this code:</p>
  
  <pre><code>sql = "INSERT INTO ASSETS (Key, Region, Branch) VALUES ('ABCF1258EF', 'MY_REGION', 'MY_BRANCH');"
  </code></pre>
  
  <hr>
  
  <pre><code>Public Sub connectDB(sql As String, ConnectionString As String)
  
      Set DBcon = New ADODB.Connection
      Set rst = New ADODB.Recordset
      Set DBCom = New ADODB.Command
  
      DBcon.Open ConnectionString
      DBCom.ActiveConnection = DBcon
      DBCom.CommandText = sql
      DBCom.Execute
  
  End Sub
  </code></pre>
  
  <p>Although I am getting the error</p>
  
  <p><code>Syntax error in INSERT INTO statement</code></p>
  
  <p>It works well if I insert a new ID getting the last ID and appending + 1 but this is not a good practice.</p>
  
  <p>I do it normally when I use MySQL connection but with MS Access it is not working.</p>