J
Jay
Hi all –
The following code fails to compile when run. A ‘Type mismatch’ error
occurs on the 'Do Until…' statement.
With rs ‘valid recordset object
'load records
.MoveFirst: .MoveLast: .MoveFirst
'move to 10th record and capture its bookmark
For i = 1 To 9
.MoveNext
Next i
varBookmark = .Bookmark '10th record
'Step through records until bookmarked 10th
'record is found, starting at record 1.
.MoveFirst
Do Until .Bookmark = varBookmark
.MoveNext
Loop
MsgBox "Bookmarked record found."
End With
I’ve also tried the following alternative ‘Do Until’ statement, but it also
fails to compile with a ‘Method or data member not found’ error even though I
have set references to the MS ADO 2.5, 2.8, or ADORecordset 2.8 Libraries:
Do Until .CompareBookmarks(.Bookmark, varBookmark) = adCompareEqual
Thanks in Advance,
Jay
The following code fails to compile when run. A ‘Type mismatch’ error
occurs on the 'Do Until…' statement.
With rs ‘valid recordset object
'load records
.MoveFirst: .MoveLast: .MoveFirst
'move to 10th record and capture its bookmark
For i = 1 To 9
.MoveNext
Next i
varBookmark = .Bookmark '10th record
'Step through records until bookmarked 10th
'record is found, starting at record 1.
.MoveFirst
Do Until .Bookmark = varBookmark
.MoveNext
Loop
MsgBox "Bookmarked record found."
End With
I’ve also tried the following alternative ‘Do Until’ statement, but it also
fails to compile with a ‘Method or data member not found’ error even though I
have set references to the MS ADO 2.5, 2.8, or ADORecordset 2.8 Libraries:
Do Until .CompareBookmarks(.Bookmark, varBookmark) = adCompareEqual
Thanks in Advance,
Jay