What you need to do is save the record
position before you requery the form.
The following is some sample code that
will give you an idea of how this can be done.
The following example assumes that you are
using a data source that supports bookmarks.
For example, Microsoft Jet databases do
support bookmarks so this will work using Jet.
This code also assumes that it reside in a
method of the form so we don't have to
qualify an object to use the Bookmark property.
Looking up Bookmark in the help system will
give you detailed information on its usage.
That Bookmark property also applies to the
Recordset object and it can be very helpful.
< sample >
DIM strTemp As String
' ... code before
Set strTemp = Bookmark
Requery
Bookmark = strTemp
'...code after
I hope this was helpful, please let me know if you have further questions.
Sincerely,
Scott Millhisler
SJM Computer Consulting