Solved

MS Access - Stay at the top of the tab

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

827 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