save & restore vertical scroll position

J

JerryG

On a form with Default View = Continuous Forms and Scroll Bars = Vertical
only, when the table is displayed, and a record is added to the table that
will be positioned between two rows currently displayed, on doing a requery
to show the added row; the form redisplays scrolled up all the way to the top.

Is there any way to save the current scroll position so that after the
requry the form may be scrolled down to the position where it was before the
requery?
 
S

Stephen Lebans

See the SelTop solution here:
http://www.lebans.com/setgetsb.htm

SetGetSB.zip is a database containing functions to allow a user to Set or
Get the current position of a ScrollBar Thumb for a Form.

NEW - Apr. 02/2000 The current ScrollBar position is equal to the current
Record Number being displayed at the Top of the Form.

Works in Form or Datasheet view.

Ver 1.7

Fix bug in SelTop method. Now works with first page of rows properly and
sets the Top row correctly when moving forward in the recordset one row at a
time.

Ver 1.6

Use SelTop to save Restore current row's position after a Requery.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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