Hi All,
I'm trying to clone the recordset that is the recordsource of my form so I can determine if I've reached the last record in the recordset as I move through it with a button on the form.
My current code is...
I put this on the onClick property of the 'Next' button that will move to the next record. However, I keep getting the error
"Data Provider could not be initialized" on Set rs = Me.RecordsetClone
Does anyone know why this is happening?
Thanks in advance
I'm trying to clone the recordset that is the recordsource of my form so I can determine if I've reached the last record in the recordset as I move through it with a button on the form.
My current code is...
Code:
Dim rs As ADODB.Recordset
Set rs = Me.RecordsetClone
rs.Bookmark = Me.Bookmark
If Not (rs.AbsolutePosition + 1 = rs.RecordCount) Then
DoCmd.GoToRecord , , acNext
End If
I put this on the onClick property of the 'Next' button that will move to the next record. However, I keep getting the error
"Data Provider could not be initialized" on Set rs = Me.RecordsetClone
Does anyone know why this is happening?
Thanks in advance