set focus & screen movement

G

GBA

in Access03 have tabbed page/control about half way in the screen form/detail
area.

There are 3 tabs and each tab has inset a subform.

When one selects a tab, the focus moves to the first control in the subform;
but the screen display slides up this control to the detail/header bar ; and
thus the info above the tabs, and the tabs themselves no longer display...

please no wise cracks about getting a bigger screen !!

The work-around is I believe to force a set focus into a control that sits
up above the tabs. But the tab Ctl OnClick event will not set focus to any
other control I believe the subform load itself is taking precedent. Have
experimented with the subform load/current/activate and haven't found any
joy...

Have realized that am wasting a bit of time on this silly appearance issue
but now has turned into a learning experience....would welcome sage advice...
 
J

Jack Leach

I don't know about sage advice, but this may work, though probably it is not
ideal...

In a standard module declare a Public boolean variable. Lets call it
bTabChanged...

What you want to do is set this value to True when the user clicks the tab
(this will be the tab control's Change event)

Then in the subform control, use the GotFocus event to get the status of the
user click...

If bTabChanged Then
Me.Parent!SomeOtherControl.SetFocus
bTabChanged = False
End If

This way, when the user clicks the tab, the focus should go to the control
on the main form, resetting your view. Then if they click the subform,
without changing the tab, the focus should remain in the control.

I haven't tested it, but I think it may work.

gl!


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
G

GBA

hmmm maybe - thanks for the input......am just wondering though whether as
soon as I go into that first control in the subform it will slide up
anyway....so that all this is just delaying the slide up moment....

probably locking in a form size that has no scroll requirement is the fix
but that's not ideal either since there are alot of controls.....
 
P

Paul Shapiro

You said in your first post you didn't want any wisecracks about getting a
bigger screen, but I really don’t think there's any good way to work with a
form that can't be completely displayed on the screen. So I'd recommend a
smaller form. Maybe you can move the data that's currently displayed above
the tabs onto a new first tab. Or reduce the font sizes if they're still
bigger than the minimum size legible for your users. Or split the current
tabs into more tabs that are smaller. Or move some of the data to separate
forms, giving your users an easy way to open the related forms to the
appropriate record.
 
G

GBA

well you are right in the most fundamental sense...

still pragmatic reality is that the subform is tall/long and since it is the
sole control in the tab page splitting it is problematic and not what the
user wants....

one definitely can trick the screen to not moving by having the focus go to
an upper control above the tabs when selecting a tab - - which is ok when
viewing data....

but when one goes into the subform then it always slides up automatically -
as far as I can tell at least so far... I'm guessing it is a reasonable
thought that when entering a subform that the control in focus should go to
the upper bar....but the design look is the subform being integrated and not
noticed as even a subform but just part of the form - so that it is an odd &
uneven experience when the screen moves of its own accord and not due to the
user scrolling...

not sure this behavior is the same in 07
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top