473,718 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.SelectObj ect 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 2055
On Fri, 12 Oct 2007 05:34:21 -0700, Denise <dh*****@gmail. comwrote:

I would try the BringWindowToTo p API:

Public Declare Function BringWindowToTo p Lib "user32" Alias
"BringWindowToT op" (ByVal hwnd As Long) As Long

BringWindowToTo p 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.SelectObj ect 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
1354
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 field/button on the form just opened as if I clicked on it. And then back to the treeview control when the form closes. Thanx all -gh
3
2877
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. Forms(myFormName).SetFocus does not bring frmFormName to the front. How can this be done?
149
25155
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? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
4
9689
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. RegisterStartupScript("sf","<scriptlanguage='javascript'>document.form.MyControlID.focus();</script>"); 2. Andy Smith's FirstFocus control from http://www.metabuilders.com/tools/FirstFocus.aspx
0
1288
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 is set to my reference field and the find command is executed prompting the user for the reference he/she wants to find. I pasted the code from a Find command box i created, but cant work out how to use the setfocus when the form is opened to go...
1
2058
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 the records set of the form. I doing though the cursor jumps back to the first row. I would like the cursor to move back to the next row in relation to the record that just disappeared as a result of the refresh.??
7
2104
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 properties I have setfocus on the last field on the each of the subform to move to the first field of the next subform when using Tab. The problems only occurs when I create a new records. One of the subform doesn't display properly on the form, such...
8
9767
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 "fAAA". fNavButtons has 2 CommandButtons, cmdNextRec and cmdPrevRec. These are on a subform to allow an AutoRepeat to continue when form fAAA gets another record. If I am at the first record, I want cmdPrevRec.Enabled = False, and if I am at the...
4
16317
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 appears next to it. After the command button appears I need the cursor to go back to the last letter of the textbox so that the user could continue typing without interruption. I use OnChange event for that: Private Sub CustomerName_Change() ...
0
9352
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9206
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7985
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6652
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4481
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4740
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3180
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.