Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

What is this line of code doing?

I'm working with an old Access 2003 database and on a particular form there is a combobox.  In the afterupdate event of the combobox is this line of code:

If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Can someone tell me what it does?

--Steve
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One important point on bookmarks; the values don't survive a requery or anything that causes the recordset to be re-created (a close and open).

They are only valid for the current recordset.  Once you close it or requery it, any saved bookmark values are invalid.

 So it's not something you can save forever.  It's sole purpose is to be able to move back to a given record quickly in a recordset that your currently using.  In using it, you don't need to save a key for the record, then do a find.  That is however what your forced to do if you can't use a bookmark (say because you are doing a requery).

Jim.