Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jumping screen

Status
Not open for further replies.

Saphyre88

Programmer
Nov 19, 2006
3
CA
Hi everyone,

I have a tab control on my form that contains multiple subform. Whenever I go through tabs, the screen kindda moves active subform in the middle of the screen, hiding important data above screen limits. To see info or make changes I have to scroll up/down the screen. When the form is first loaded, everything is OK.

I tried setting Subform.AutoCenter to NO but it does not help.

anyone knows what's going on?
 
When the form is first loaded, everything is OK.
So the "jumping" happens after you have been entering/viewing the data in the subforms, right? For each subform the focus will remain in the field where you last left it. If you scroll down in one subform and then put the cursor at the last field, it will remain there until the next time you activate that subform. In other words, leaving a subform does not refresh the focus back to the top of the form.

You may also have some code behind the form causing the "jumping", such as DoCmd.GotoPage (does the form have page breaks?) or myField.SetFocus.

It may be totally something else but you will probably have to supply more details.
 
Assuming that:
1. The parent form screen position doesn't change.
2. The subform control's position doesn't change relative to the tab page.

then the quick and dirty way would be to use the tab control's OnChange event like this:
....
SubForm.SetFocus
SubForm.Form.FormControl.SetFocus
....
making sure that FormControl is at the top of the subform.

If the control at the top of the subform can receive the focus, changing the tab order of the subform controls might have the same effect.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top