rst.Bookmark vs rst.CurrentRecord

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

I need to be able to identify the current record, and then make it current
again, after executing a .movelast .movefirst (which I need to do in order
to have a current record if there's only one record in the recordset and I
have moved to it, just retrieved it.... go figure).

Anyway, I can see how to find out the value of <recordset>.currentrecord or
<recordset>.bookmark, but I can't find out how to use those values to make
that record current again.

TIA for any help.
 
You could try code like this:
dim bkmk as variant
with rst
bkmk=.bookmark
.movelast
.movefirst
.bookmark=bkmk
end with

But if you don't have a current record, I can't see how you'd have a
bookmark or currentrecord property either...

- Turtle
 
But if you don't have a current record, I can't see how you'd have a
bookmark or currentrecord property either...

Hmm... Good point. I've revised my approach to use this (having recently
learned about BOF).
This seems to work OK. In this context there would never not be any rows at
all.

If lrstMe.BOF = True Then
lrstMe.MoveFirst
End If
 
Back
Top