return to last place after requery

Y

yaniv d

hi everyone,
i build a form based on a query.
this query is returning the new values after doing requery
the problem is when you do requery the screen returns to the first
record.
is there a way to make the screen stay in the same place that have been
updated?
 
A

Arvin Meyer [MVP]

Yes, try something like:

Dim lngID as Long 'ID before requery.

'Get the ID, unless it is a new record.
If not Me.NewRecord Then
lngID = Me.txtID
End If

'Requery, and find the ID again.
Me.Requery
With Me.RecordsetClone
.FindFirst "ID = " & lngID
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Y

yaniv d

thanks for your help arvin,
my question is if im using information for filtering,will it be usefull
for finding the row or i need diffrent sentence for it(i have several
of groups depending on)


Arvin Meyer [MVP] כתב:
 

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

Similar Threads


Top