Setting Default Position of Scroll Bar

  • Thread starter Thread starter Gabe
  • Start date Start date
G

Gabe

I have a form that is too long for all of it to fit on
the screen at once. I would like to view the summary
info at the top when I open it and when I advance the
records. The problem is that everytime I advance to a new
record the scroll bar defaults to the middle of the form
which is very annoying. Is there a way to adjust this so
the scroll setting defaults to the top of the form? Gabe
 
Gabe said:
I have a form that is too long for all of it to fit on
the screen at once. I would like to view the summary
info at the top when I open it and when I advance the
records. The problem is that everytime I advance to a new
record the scroll bar defaults to the middle of the form
which is very annoying. Is there a way to adjust this so
the scroll setting defaults to the top of the form? Gabe

I'm having the same problem. Nobody posted a reply to this, but I was
wondering if by chance you'd figured out a fix anyway? I tried to
Google for an answer but couldn't find a fix that way. It is very
frustrating to have the form fail to appear properly, and I have to
scroll back to the top each time.

I'll keep watching for replies to your/my problem, but if in the
meantime you figure something out could you post it or email me direct?
Thank you very much in advance.

- David Kistner
 
Thanks David,
I'm still working on this. I have started poking around
on http://www.mvps.org/access/ if you haven't already and
want to check it out. They seem quite knowledgeable. I
will let you know if I ever figure this out. Feel free
to E-mail me directly as well. Gabe
 
Access will automagically scroll the form to bring whatever control has
the focus into view. If you're not happy with the results you can set
the focus to a different control first, causing Access to scroll the
form, and then set the focus to the desired control.

If the above solution is not satisfactory then for programmatic control
of the ScrollBar see:
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.


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Thanks Stephen, This is getting a little over my head.
Can you help me where to look for the control and focus?
Gabe
 
David,
I had the same problem and found a solution by doing
this

Private Sub Form_current()
DoCmd.GoToPage 1,0,0
End Sub

You don't need to make pages!
In my case it was the final solution.
Kind regards Piet
 
Back
Top