See the SelTop sample Form 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.
Ver 1.5
Added support for Horizontal ScrollBars.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Paul T. RONG" <et***@hotmail.com> wrote in message
news:fY******************@news.chello.at...
Dear all,
Can one control the subform scrollbar through vba?
For example, I would like to make two command buttons on the main form
to control the subform scrollbar. Click 1st button the subform vertical
scrollbar goes down to the end, click 2nd button goes up to the top
position.
Thank you for your help,
Paul