unwanted scrolling!

G

Guest

Does anyone know how to keep a form from automatically scrolling down a page
when you are filling in data etc.? For example, with tab pages (at least mine
with long sub-forms in them) if you click on the page tabs, Access will
automatically scroll down the page and the tabs disappear below the header at
the top of the page, requiring the user to use the mouse to grab the scroll
bar on the right side of the page to scroll back up and make the tabs
visible.


Thanks!
 
B

BruceM

You could try checking the tab order for that tab (two different uses of the
word "tab" here). In form design view click on the tab, then click View >
Tab Order.
 
G

Guest

Bruce, thanks for the reply but it is not an order problem. What happens is
that the page automatically scrolls down so that you have to grab the scroll
bar and move it back up. It only happens when i have a long (or several)
sub-forms on the page.

any other ideas?
 
D

Douglas J Steele

Did you check Bruce's suggestion? The only reason it should scroll is if the
control that has focus isn't visible initially. (i.e. if the first control
in the tab order is off the page)
 
G

Guest

I know what you are saying but if I have a field that gets the focus and it
is on a subform on a page, if the subform is long, the scroll bar will move
and hide the tabs. The only way around this is to put a field above the pages
and use events to go to it- it is sloppy and still there is some scolling .
Since it appears to be a product of a long sub-form (will do the same thing
if on tab pages or not), I assumed that there would be a common solution.

thanks
 
B

BruceM

Now that I understand the issue, I will say I have been grappling with the
same sort of thing. I have been searching Google groups and so forth, and
can only agree that from what I have been able to discover there is no tidy
solution. The only thing I could figure out was to use the form's Current
event to place the focus to a small unbound text box (formatted to look like
the background) at the top of the main form, then to use that text box's Got
Focus event to pass the focus to another control. When I did that I
received an error message that I couldn't set the focus to the unbound text
box, but then the focus was indeed passed to the desired control, so I
trapped the error. However, when I pass the focus to the subform control
the main form scrolls down so that the subform is in the center.
Maybe you could either reverse the subform record source's sort order, or
you could use code in the main form's current event to go to the subform
control, then to go to the first record (or the last, as needed). I haven't
experimented much with either of these, and am just offering them as
possibilities.
 
G

Guest

Thanks bruce.

It sounds like we have similar problems! Now that I know that there is not a
quick fix I will address it best I can as you have outlined.

Thanks!
 
B

BruceM

I'm not saying there is no better solution, only that I cannot find one.
It's not the first time I have had to experiment. Good luck.
 
G

Guest

I know exactly what you are talking about. I just found a quick solution to
this problem for me yesterday.

What I did was go to the On Load event of the form and set the focus on the
name of the first tab. It worked for me...Let me know how you make out.
 

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