Solved

MS Access - Stay at the top of the tab

Posted on 2014-10-17
5
466 Views
Last Modified: 2014-10-20
I have a MS Access form with multiple tabs and sometimes when you go from one tab to another it does not take you to the top of the tab.  Typically this will happen if for example I am in tab 1 at the bottom of the page and then click on tab 2.  When I go to tab 2 I will be at the bottom of tab 2.

What code would I use to bring to the top on the move to another tab event.  Also what would the event name be called when I move between tabs ?
0
Comment
Question by:upobDaPlaya
  • 2
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40387162
The event you use when you move between tabs is the Change event.

Are you saying that the tab control is actually larger than the form, so as you enter values in fields, the further you move down the form, you actually lose sight of the top of the form, or of the controls at the top of a subform on a tab?

If you can take a screen shot of what you are experiencing and post it back here, it would be helpful.
0
 

Author Comment

by:upobDaPlaya
ID: 40387972
Whats happening is when I am in tab 1 (it does not matter where), when I go to tab 2 (page2) I am dumped down to the middle of the form...It does not matter what tab/page I come from..when I come into tab 2 I am not placed at the top of the form..
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 250 total points
ID: 40388051
Hi,

the position of the form is dependant of the focus. The initial focus is dependant of the tab order you have set to your controls. So if you want the top of the form displayed there should be a control near the top of the form where you set the focus to ("ctlName.SetFocus") or it should be the one with tab order 1 ("tab order" has nothing to do with the tab control, it is the order of controls where the focus jumps to when the user leaves one control with the tab key to jump to the next).

Cheers,

Christian
0
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 250 total points
ID: 40388675
No points please.

Based on that 2nd explanation, I'd agree with Christian, check the tab order of the controls on that 2nd tab.
0
 

Author Closing Comment

by:upobDaPlaya
ID: 40393506
Excellent ! That was it...
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now