G
Guest
After failing to get bookmarking to work, I set up a tiny little test table and then a form based on query with a simple command button with a click event. The code comes right out of several papers and Access help and is as follows
Private Sub testbookmark_Click(
Dim szbookmark As String, rst As Recordset '1 paper says DAO.recordset - no diff..fail
Set rst = Me.RecordsetClon
szbookmark = Me.Bookmark 'bookmark 1st recor
rst.MoveNext: rst.MoveNex
MsgBox "should be at record 3" 'at this point I haven't moved off of record
rst.Bookmark = szbookmark 'should go to record
rst.MoveNext 'should go to record
MsgBox "should be at record 2" 'I'm still at record on
Any idea what I'm missing here
Regards, Ro
End Sub
Private Sub testbookmark_Click(
Dim szbookmark As String, rst As Recordset '1 paper says DAO.recordset - no diff..fail
Set rst = Me.RecordsetClon
szbookmark = Me.Bookmark 'bookmark 1st recor
rst.MoveNext: rst.MoveNex
MsgBox "should be at record 3" 'at this point I haven't moved off of record
rst.Bookmark = szbookmark 'should go to record
rst.MoveNext 'should go to record
MsgBox "should be at record 2" 'I'm still at record on
Any idea what I'm missing here
Regards, Ro
End Sub