By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,857 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.