Bookmarks

  • Thread starter Thread starter Tom T.
  • Start date Start date
T

Tom T.

I have a form that has a timer event...it requeries the
database to show added or deleted records.

When I do this, the form is reset to the first record. I
need to trap the forms selected record bookmark, do the
requery, then reset the form to the bookmark it was at.

hooowwwww do I doooo thisss??
 
Any requery makes all existing bookmarks invalid.

So, your code will have to save the current key id, and then equerry..and
them move back.

The "air" code would look like


dim lngCurrentID as long

lngCurrentID = nz(me.ID,0)
me.Requery

if lngCurrentID <> 0 then
me.RecordSetClone.FindFirst "id = " & lnCurrentID
me.BookMark = me.RecordSetClone.BookMark
end if
 
Back
Top