473,436 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,436 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 2043
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Geir Holme | last post by:
Hi all. I am looking for something as simple as the good old "SetFocus" command. When I opens a form from a menu treeview controll I want to move the "blue marker" (focus) over to one particular...
3
by: Lauren Quantrell | last post by:
I have a bunch of hidden, popup, non-modal forms. Forms(myFormName).SetFocus makes myFormName visible. However... I have a bunch of non-hidden, popup, non-modal forms....
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
4
by: Mad Scientist Jr | last post by:
i am trying to set focus to a specific control depending on the outcome of a validator control and it is not working. none of these methods are working to setfocus: 1....
0
by: z.ghulam | last post by:
Hi, I'm creating a new databse and have a couple of problems I'd greatly appreciate any feedback on. 1) I have an order form and would like to set it, so that when the form is opened, the focus...
1
by: Norman Fritag | last post by:
Hi everyone, I was wondering what is the best way to bring back the focus to the last row rather than by default to first row. I run and update process. Once completed Success fully I refresh...
7
by: Hong | last post by:
Hi I have a main form with 7 subforms where the master/child link is the RefID in the main form where the Main form is 1-many relationship to those subforms. All the subform have the same...
8
by: OldBirdman | last post by:
This should be so, so simple I hesitate to ask. I have a Form named "fNavButtons" used as a SubForm in control named "subformNavButtons". subformNavButtons is a control on my main form named...
4
by: Michael R | last post by:
Hi everyone. I wanna say first, I appritiate a lot the fact that I'm able to ask questions here! I have a form with a textbox that if its value equals to a certain condition, a command button...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.