Link to home
Start Free TrialLog in
Avatar of DrftrBob
DrftrBobFlag for United States of America

asked on

Recordset bookmarks

This code doesn't seem change the bookmark value.  I can't tell why not.
    Dim State_rst As DAO.Recordset
    Dim lngCountOfSourceItems As Long
    Dim lngOriginatingRecord As Long           ' will be a recordset bookmark
    Dim i As Integer ' my record counter index

    Set State_rst = CurrentDb.OpenRecordset("tblStates", dbOpenDynaset)
    State_rst.MoveLast           'Makes sure count below is correct
    Let lngCountOfSourceItems = State_rst.RecordCount
    State_rst.MoveFirst          ' Make sure to start at beginning
    For i = 1 To lngCountOfSourceItems
        Let lngOriginatingRecord = State_rst.Bookmark 
        << do something >>
    State_rst.MoveNext
    Next

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
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
Avatar of DrftrBob

ASKER

If I may ask a silly question, what type of data is a bookmark?  If silly, I can accept that.  I suppose debug.print won't display the data properly.  My watched variable seems to be an array now.  Dang - it's late.
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
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