Scroll Bar position with a subform

pelicanbuyer

Registered User.
Local time
Yesterday, 21:06
Joined
Dec 11, 2012
Messages
12
I have a form that i have created with various tabs along the top, e.g. customer details, customer contact etc etc.

I have a subform on one of the tabs.

That subform also has tabs on it.
When clicking on the main form tab it goes to subform but the scroll bar moves down only to show the subform tab options.

I have to keep scrolling back up to see the main form tab options.

Is there something I can do to stop this happening please?
 
I believe Access is trying to position the subform scroll bar to allow visibility to what ever control on the subform initially has focus.

Do you have a control near the top of the subform which you could either:

1) Make the first control in the Tab Stop list or
2) In the Load event of the Form which you are using in the subform control of the main form, issue a call to SetFocus of a control at the top of the Form. Ex:
Code:
  'Move focus to this display field of the form
  Me.fldvendortitle.SetFocus
 
Unfortunately not, the tab on the subform is directly under the tab on the main form with nothing in between.

I just wondered if there was a command to make the scroll bar go to the top on opening the subform as its the main form scroll bar that moves down a little if that makes sense?

Its annoying as the only distance it goes is the distance of the main form tabs!!!!

Ref second suggestion I am not quite sure what you meant, sorry.
Am I altering the properties of the main form or the sub form?
 
Last edited:
I just wondered if there was a command to make the scroll bar go to the top on opening the subform as its the main form scroll bar that moves down a little if that makes sense?

The only way I know to force the scroll bar is to send SetFocus to a control, and doing so causes the scroll bar to follow the focus.
 
Can you therefore setfocus of a subform to be something on the main form?
 
No, the subform has no general awareness of the mainform controls.

Besides, the scroll bar is for only the subform, correct? I do not follow your thinking to SetFocus to a control on the main form in hopes that the subform will scroll up.
 
No its the main form scroll bar that moves I believe. It just moves to focus on the subform when I tap the tab with the subform on it :/
 
Perhaps attach a screen shot, please.
 

Users who are viewing this thread

Back
Top Bottom