Why clone an MS-Access recordset?

后端 未结 4 1625
孤独总比滥情好
孤独总比滥情好 2020-12-20 18:51

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

Set rstClone = Me.RecordsetClone
rstClone.MoveFirst

<
4条回答
  •  感情败类
    2020-12-20 19:51

    Using the recordset property can cause unintended behavior. Specifically (in Access 2010), if you refer to me.recordset, it can unexpectedly cause the form's edit buffer to be saved.

    Ex.:

    debug.print me.recordset.recordcount
    

    will cause the form's record to be saved. Using recordsetClone will not exhibit this [mis]behavior.

提交回复
热议问题