Bookmark

L

laura

I need to know how to save or bookmark a record so I can go back to it when
I requery a form. My form is based on a query which I created in the Query
Design window. I have a ClientID number which I could save to a variable,
but am not too sure how to do this.

Thanks
Laura TD
 
A

Arvin Meyer [MVP]

Basically, you dim a variable and set it to the ID of the current record
before you requery it. Then after you requery the form you move to the
record.

Dim lngID As Long

lngID = Me.txtID

' do stuff
Me.Requery

Me.RecordsetClone.FindFirst "ID = " & lngID

If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
L

laura

Thank you Arvin,
Just what I was looking for. It was the RecordsetClone I was not familiar
with. Many thanks.
Laura TD
 
Top