472,145 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 1972
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
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.