How do you compare bookmarks in DAO recordsets?



I'm using fairly standard code in Access 2000 to move a form to a specific
record (see code fragment below). It all works fine, but other parts of my
coding depend on the bookmarking process triggering the Form_Current event -
something that does not happen if the form is already at the record being
requested (a situation that may occasionally happen).

I would like to be able to test if the RecordsetClone bookmark is the same
as the form's bookmark but I haven't been able to find a method that works
for DAO recordsets. Can anyone help, please?


Dim rst as Recordset
Set rst = Me.RecordsetClone
rst.Findfirst << logical test here >>

If rst.NoMatch Then
MsgBox "No match was found"
Else
Me.Bookmark = rst.Bookmark
End If


.



Relevant Pages

  • Re: How do you compare bookmarks in DAO recordsets?
    ... >I'm using fairly standard code in Access 2000 to move a form to a specific ... >record (see code fragment below). ... >I would like to be able to test if the RecordsetClone bookmark is the same ... >for DAO recordsets. ...
    (microsoft.public.access.formscoding)
  • Re: How do you compare bookmarks in DAO recordsets?
    ... Make sure you include the DAO 3.6 Library in the References and then declare ... Dim rst As DAO.Recordset ... > I'm using fairly standard code in Access 2000 to move a form to a specific ... > I would like to be able to test if the RecordsetClone bookmark is the same ...
    (microsoft.public.access.formscoding)