Refocusing on Top form after previous top form closes (1 Viewer)

Danick

Registered User.
Local time
Today, 07:39
Joined
Sep 23, 2008
Messages
351
I have several buttons on a ribbon like switchboard form that will open forms below. The forms open one on top of another just below the switchboard form.

When a user selects a form to open, it is in focus and the corresponding button on the switchboard form changes color to the form that is active (in focus). I'm trying to simulate what any Windows application menu does.

But when the user closes that form, and a previously opened form is now being displayed, the form is not active (in focus) so the button on the switchboard doesn't change color. Until the user clicks anywhere in the form.

How can I close the top form and re-activate the previous form (if there was one).

Thanks
 

JMongi

Active member
Local time
Today, 07:39
Joined
Jan 6, 2021
Messages
802
Since you are launching the forms, can you use their launch order to track which should be the "on top" form?

Recognizing that is likely impractical, here is another thought. I'm fairly certain that I've read on the internet that Access keeps track of the Z-level of various elements and you may be able to cycle through your form elements z-levels to find which form has the highest z-level and give it focus. Sorry, I'm not skilled enough to give you the details on how to do it. But, I think that approach should be possible.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:39
Joined
Oct 29, 2018
Messages
21,358
Just curious, can you post some screenshots?
 

Users who are viewing this thread

Top Bottom