Bookmark

  • Thread starter Thread starter laura
  • Start date Start date
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
 
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
 
Thank you Arvin,
Just what I was looking for. It was the RecordsetClone I was not familiar
with. Many thanks.
Laura TD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top