Why clone an MS-Access recordset?

dmr picture dmr · Mar 2, 2010 · Viewed 27.1k times · Source

I'm a newbie at VBA and attempting to understand someone else's code.

Set rstClone = Me.RecordsetClone
rstClone.MoveFirst

Why does the recordset have to be cloned? Why can't the code be Me.Recordset.MoveFirst?

Answer

Fionnuala picture Fionnuala · Mar 2, 2010

You may wish to use the recordsetclone because you do not wish to affect the records displayed in the form, which me.recordset.movefirst would do.