title: The expression you have entered refers to an object that is closed or doesn't exist error
body: <p>I am trying to open 2 ADODB recordsets on a button click event like:</p>
  
  <pre><code>    Private Sub btn1_Click()
          Dim rs As New ADODB.Recordset
          Dim rst As New ADODB.Recordset
  
           rs.Open "UPDATE table ITEM = " &amp; Me.ITEM &amp; " where ID = " &amp; ID, CurrentProject.Connection
         rs.Close
         Set rs = Nothing
  
        rst.Open "Update Table2 set Item2 = " &amp; Me.Item2,CurrentProject.Connection
  
  End Sub
  </code></pre>
  
  <p>The first error I get is on <code>rs.close</code> where it says:</p>
  
  <blockquote>
    <p>Operation is not allowed when the object is closed.</p>
  </blockquote>
  
  <p>I am really confused about this error as I have clearly not closed the record set <code>rs</code>.</p>
  
  <p>But even when I remove <code>rs.close</code> I get:</p>
  
  <blockquote>
    <p>The expression you have entered refers to an object that is closed or
    doesn't exist</p>
  </blockquote>
  
  <p>on the    </p>
  
  <p><code>rst.Open "Update Table2 set Item2 = " &amp; Me.Item2,CurrentProject.Connection</code></p>