Show Form in Front

Theresa

New member
Local time
Today, 13:44
Joined
Mar 29, 2012
Messages
8
I have a screen with two forms (one behind the other). To view the hidden form I have passed the focus to one of its textboxes. However, this does not bring it forward (in front of the other form). How do I force the form (using code) to come to the front. I could do a menu item but not too sure of the exact syntax. Thanks.
 
The simple answer is to only open the "hidden" form when you need it.

What is the thought process / reason behind your approach of a hidden from?
 
The form is not deliberately hidden for any reason than there is not enough room on the screen for both forms. The first form 'Switchboard' holds the options that open other forms. However, when a user is in a form and wants to return to the switchboard (which is still open) the user either has to minimise or move the form to get to the Switchboard. I know I could close the Switchboard and then re-open it, but that's just extra code when the Switchboard is already open.
See, I'm basically stingy with my code.;)
 
OK, then i would put a command button on the form(s) to close form and go back to the Switchboard (DoCmd.Close acform,Me.Name). That way the user gets the Switchboard back up and can choose their next action.
 
Thanks, I was thinking the same thing. I did notice however that if I open an open form it will come to the top without an error message. That's another way around it if the user wants to see part of the form as well as the switchboard.;)
 
Else you can use
Forms.YouSwitchboardName.SetFocus
it will bring the Switchboard in front.
 

Users who are viewing this thread

Back
Top Bottom