Solved

MS Access - Stay at the top of the tab

Posted on 2014-10-17
5
504 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

863 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

23 Experts available now in Live!

Get 1:1 Help Now