469,625 Members | 1,109 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

SetFocus doesn't bring opened form to top after first time

I have several big forms that are Maximized on Load. I have "Jump"
buttons on each to flip to other related forms.
- 'Needs' form has jump button to it's linked Project, if it is linked
- Project form has jump button to it's Decision Record form and vice-
versa
- Project form has jump button to the Needs form for each of its
linked 'Needs'

The first time you click any jump button the called form comes up and
fills the screen. But once you have all three main forms open (Need,
Project, DecRec) then the SetFocus part still works fiine, but it just
doesn't pull that form to the 'top of the pile'. User has to click
the form button down in the tray at the bottom of the screen.

I've tried DoCmd.SelectObject acForm, "frmMainProject", vbYes (and
also tried vbNo)
after the SetFocus but that wasn't the trick.

Users who have dual monitors can set the windows to non-maximized and
drag one form to the left hand monitor and one form to the right hand
monitor, showing two at once, and things are ok. Users who only have
one monitor would like the form they jumped to to fill the screen.

Any ideas?
Thanks! Denise

Oct 12 '07 #1
1 1896
On Fri, 12 Oct 2007 05:34:21 -0700, Denise <dh*****@gmail.comwrote:

I would try the BringWindowToTop API:

Public Declare Function BringWindowToTop Lib "user32" Alias
"BringWindowToTop" (ByVal hwnd As Long) As Long

BringWindowToTop Me.hWnd

-Tom.
>I have several big forms that are Maximized on Load. I have "Jump"
buttons on each to flip to other related forms.
- 'Needs' form has jump button to it's linked Project, if it is linked
- Project form has jump button to it's Decision Record form and vice-
versa
- Project form has jump button to the Needs form for each of its
linked 'Needs'

The first time you click any jump button the called form comes up and
fills the screen. But once you have all three main forms open (Need,
Project, DecRec) then the SetFocus part still works fiine, but it just
doesn't pull that form to the 'top of the pile'. User has to click
the form button down in the tray at the bottom of the screen.

I've tried DoCmd.SelectObject acForm, "frmMainProject", vbYes (and
also tried vbNo)
after the SetFocus but that wasn't the trick.

Users who have dual monitors can set the windows to non-maximized and
drag one form to the left hand monitor and one form to the right hand
monitor, showing two at once, and things are ok. Users who only have
one monitor would like the form they jumped to to fill the screen.

Any ideas?
Thanks! Denise
Oct 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Geir Holme | last post: by
3 posts views Thread by Lauren Quantrell | last post: by
149 posts views Thread by Christopher Benson-Manica | last post: by
4 posts views Thread by Mad Scientist Jr | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.