Form Positioning After Editing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I have a Tab Control form and one of the Tabs shows a Main form with a
subform. Both can be seen without the need for a vertical scroll bar, which
I've disabled. The main form has a label right at the top and I have set the
focus, using an On Current Event, to the topmost text Field which is just
below it. When this form is first opened and when I step through the records,
it opens 'top down' and I can see the label. However, when I edit one of the
subform fields and then step to another record, the focus jumps to the text
field correctly but the top label is off the screen. Is there a way of
ensuring that the whole of the form is always shown, from the top down?

Of course I could reintroduce the vertical scroll bar and let the user do it
but I'd rather it was done automatically.

Thanks, JohnB
 
JohnB said:
Hi.

I have a Tab Control form and one of the Tabs shows a Main form with a
subform. Both can be seen without the need for a vertical scroll bar, which
I've disabled. The main form has a label right at the top and I have set the
focus, using an On Current Event, to the topmost text Field which is just
below it. When this form is first opened and when I step through the records,
it opens 'top down' and I can see the label. However, when I edit one of the
subform fields and then step to another record, the focus jumps to the text
field correctly but the top label is off the screen. Is there a way of
ensuring that the whole of the form is always shown, from the top down?

Of course I could reintroduce the vertical scroll bar and let the user do it
but I'd rather it was done automatically.

That behavior suggests that the subform control is in fact not quite tall
enough. It might be tall enough so that you initially see everything that you
are interested in, but it could still be slightly shorter than required to see
the *entire* form within.

As a test just make the subform control a lot taller to see if that eliminates
the behavior.
 
Thanks Rick.

I tried as suggested but no difference. I presume you are referring to the
subform control that sits on the main form and not the control that sits on
the Tab page. I tried both anyway - when I enlarge the subform control on the
tab, the whole set of tabs is shoved off the top of the screen.

By the way, I tried putting DoCmd.Maximise in the On Current Event also, but
with no success.

Any other thoughts? Thanks JohnB
 
JohnB said:
Thanks Rick.

I tried as suggested but no difference. I presume you are referring
to the subform control that sits on the main form and not the control
that sits on the Tab page. I tried both anyway - when I enlarge the
subform control on the tab, the whole set of tabs is shoved off the
top of the screen.

I'm talking about whatever subform control exhibits the beahvior. If the
subform control is tall enough to display the form within in its entirety then
it should not be possible for any portion of that form to NOT be visible. You
can't scroll into non-existent territory.
 
Hmm. I see. I think I need to play around with the subcontrol on the tab but
not go beyond a certain size. I need to pause now - I will post a reply on
Monday on this thread. Thanks for the help. JohnB
 
Just to say I had enough time to have a play and I've sorted it. Thanks for
the help. JohnB
 
Back
Top