Requerying a Scrolling Form

B

Brian

I have a scrolling form with about 5000 records. Whenever
someone updates a record, they would like the data on the
scrolling form to also be updated. I in VBA behind
the "Close" button on the data entry form, I use forms!
[<formname>].requery to requery the scrolling form and all
is well. Except...my users don't want the scrolling form
to return to the 1st record. Does anyone know how to
program in VBA a way to requery the scrolling form and
without returning the form to the 1st record...or requery
and somehow automatically scroll the form back down to the
last record edited?
 
S

Sandra Daigle

You can do this two ways - one is to cache the primary key of the current
record by saving it in a local variable before the requery, then after the
requery, use that value to find the record.

Another somewhat easier way is to use the GetSetSB functions by Stephen
Lebans to Get and Set the scrollbar:
http://www.lebans.com/setgetsb.htm
 

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

Top