A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to stop form from automatically scrolling



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2010, 10:41 PM posted to microsoft.public.access.forms
cr113
external usenet poster
 
Posts: 33
Default How to stop form from automatically scrolling


I'm using Access 2007. I've got a tab control on a form. When the user
clicks on some of the tab control pages the form scrolls down. I'm
assuming it is trying to center the page since there are a lot of
controls on it. The problem is that you can't see the tab control
"tabs" anymore when it scolls down. Is there a way to disable auto
scroll or something. Maybe I can tell the form to scroll up in the
page click event somehow?
  #2  
Old April 9th, 2010, 12:33 AM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default How to stop form from automatically scrolling

There is no "autoscroll." What is happening is that tour tabbed control is
too for all controls to show on your screen and the first control to receive
focus on some of you pages are far enough down that it has to scroll to show
it. What you need to do is force focus on a textbox on each control that is
at the top of each page, using the OnChange event..

Private Sub TabControlName_Change()

Select Case TabControlName

Case 0 'First Page
Page1TextBox.SetFocus

Case 1 'Second Page
Page2TextBox.SetFocus

Case 2 'Third Page
Page3TextBox.SetFocus

End Select

End Sub

Remember, each textbox has to be near the top of its page.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1

  #3  
Old April 9th, 2010, 05:15 AM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default How to stop form from automatically scrolling

On Thu, 08 Apr 2010 23:33:38 GMT, "Linq Adams via AccessMonster.com"
u28780@uwe wrote:

Rather than doing that, I would make sure the tab order is from top to
bottom, so you'll have a 0-code solution.

-Tom.
Microsoft Access MVP


There is no "autoscroll." What is happening is that tour tabbed control is
too for all controls to show on your screen and the first control to receive
focus on some of you pages are far enough down that it has to scroll to show
it. What you need to do is force focus on a textbox on each control that is
at the top of each page, using the OnChange event..

Private Sub TabControlName_Change()

Select Case TabControlName

Case 0 'First Page
Page1TextBox.SetFocus

Case 1 'Second Page
Page2TextBox.SetFocus

Case 2 'Third Page
Page3TextBox.SetFocus

End Select

End Sub

Remember, each textbox has to be near the top of its page.

  #4  
Old April 9th, 2010, 03:14 PM posted to microsoft.public.access.forms
cr113
external usenet poster
 
Posts: 33
Default How to stop form from automatically scrolling

On Apr 8, 11:15*pm, Tom van Stiphout wrote:
On Thu, 08 Apr 2010 23:33:38 GMT, "Linq Adams via AccessMonster.com"

u28780@uwe wrote:

Rather than doing that, I would make sure the tab order is from top to
bottom, so you'll have a 0-code solution.

-Tom.
Microsoft Access MVP


Thanks Tom, that worked. I had already tried setting focus to the top
control on the page_click event but that didn't quite work. It didn't
scroll all the way back to the top and still left the tabs hidden.
Your way works perfectly.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.