title: VBA How to find last insert id?
body: <p>I have this code:</p>
  
  <pre><code>With shtControleblad
      Dim strsql_basis As String
          strsql_basis = "INSERT INTO is_calculatie (offerte_id) VALUES ('" &amp; Sheets("controleblad").Range("D1").Value &amp; "')"
  
          rs.Open strsql_basis, oConn, adOpenDynamic, adLockOptimistic
  
          Dim last_id As String
          last_id = "select last_insert_id()"
  End With
  </code></pre>
  
  <p>The string last_id is not filled. What is wrong? I need to find te last_insert_id so I can use it in an other query.</p>