title: Deep Copy or Clone an ADODB recordset in VBA
body: <p>I have been searching for a way of duplicating or copying a recordset in VBA. And by that I mean, having the undelying data independent of each other.</p>
  
  <p>I have tried</p>
  
  <pre><code>Set copyRS = origRS.Clone
  Set copyRS = origRS
  </code></pre>
  
  <p>When I use any of the methods I cant modify one recordset without modifying the other. So in this example: </p>
  
  <ol>
  <li>I create a recordset</li>
  <li>I populate the recordset with the name John</li>
  <li>I clone the recordset</li>
  <li>I modify the cloned one</li>
  <li>Check result</li>
  </ol>
  
  <p>Code:</p>
  
  <pre><code>Dim origRS As Recordset, copyRS As Recordset
  Set origRS = New Recordset
  'Create field
  origRS.Fields.Append "Name", adChar, 10, adFldUpdatable
  origRS.Open
  'Add name
  origRS.AddNew "Name", "John"
  'Clone/copy
  Set copyRS = origRS.Clone
  'Change record in cloned/copied recordset
  copyRS.MoveFirst
  copyRS!Name = "James"
  'This should give me "JamesJohn"
  MsgBox copyRS.Fields(0).Value &amp; origRS.Fields(0)
  </code></pre>
  
  <p>But unfortunately for me, this modifies both recordsets</p>
  
  <p>My question is:</p>
  
  <p>Is there a way of copying a recordset from another recordset and then modify the data independently of each other (without looping)?</p>
  
  <p>I know that evidently you can do it through a loop, but is there no other way?</p>