mldntodorovic
New member
- Local time
- Tomorrow, 00:02
- Joined
- Jan 17, 2025
- Messages
- 6
Hi everyone,
My name is Mladen, and I'm a bit new to all of this, but I have scavenged the forums and the rest of the internet for a few months by now, and never found a solution to this problem, or something similar as a solution, and I still refuse to believe that this exists as a problem in this day and age.
Is it possible to make MS Access to properly focus popup windows?
Let me explain: I have a navigation form that is not a popup window, and it stays in background, and so is ribbon, status bar, navigation pane (which will later be hidden for user), and so on... When I open another form (I have like 200+ forms and similar number of reports, but let's disregard the reports now) that is a popup (every one except navigation form is a popup), and then open some other form from the ribbon or from another form via button command, and then close that form to go back to the previous one or to do something else, it always switches focus to something else (everything else) but the opened forms. Why is that? I had to implement a code that will type SHIFT+F6 several times depending on what is also shown on the screen (if there is navigation pane, status bar...). So it depends how many times you have to press this combination to get back focus the form, and not the ribbon or status bar or navigation pane or whatever it decides to focus on.
Also, Form Activate, Form Got Focus, Lost Focus... all of that never works because all those forms think that they always have focus. How is that even possible? Can it be changed, so I can have a normal behavior and use some of those events.
Also, user demands to have a button on the ribbon to close the currently focused (selected) form or report, and it won't work if my code on every form's close event doesn't type SHIFT+F6 (number of times depends on cases that I described above) to activate the last focused form so it can be selected and that ribbon code can close it.
Yeah, I know about the modal option and it works how it should work (it focuses the form that opened the modal form), and then I do not use the "SHIF+F6" code on OnClose event on my forms (if the form is modal), because it then shifts focus to something else.
I can't use modal on every form because user needs to open multiple windows to work in the app. I can use it sometimes when I need from user to close that form, so I won't allow the user to interact with somethin else before he's done with the modal form.
I thought maybe there is a setting in MS Access (I have 2021), that will do this natively. I saw that in older versions of MDE and MDB files and it works perfectly (all events trigger correctly, and user can use ribbon or menu bar to close the currently active window). I think it's 2007 and 2010 office, I'm not sure.
Don't get me wrong, my solution works (somewhat, if we exclude the lack of triggering the events like Form_GotFocus, Form_LostFocus, Form_Activate), but I still refuse to believe that this can't be done natively in this day and age, as I've said above.
Any idea?
My name is Mladen, and I'm a bit new to all of this, but I have scavenged the forums and the rest of the internet for a few months by now, and never found a solution to this problem, or something similar as a solution, and I still refuse to believe that this exists as a problem in this day and age.
Is it possible to make MS Access to properly focus popup windows?
Let me explain: I have a navigation form that is not a popup window, and it stays in background, and so is ribbon, status bar, navigation pane (which will later be hidden for user), and so on... When I open another form (I have like 200+ forms and similar number of reports, but let's disregard the reports now) that is a popup (every one except navigation form is a popup), and then open some other form from the ribbon or from another form via button command, and then close that form to go back to the previous one or to do something else, it always switches focus to something else (everything else) but the opened forms. Why is that? I had to implement a code that will type SHIFT+F6 several times depending on what is also shown on the screen (if there is navigation pane, status bar...). So it depends how many times you have to press this combination to get back focus the form, and not the ribbon or status bar or navigation pane or whatever it decides to focus on.
Also, Form Activate, Form Got Focus, Lost Focus... all of that never works because all those forms think that they always have focus. How is that even possible? Can it be changed, so I can have a normal behavior and use some of those events.
Also, user demands to have a button on the ribbon to close the currently focused (selected) form or report, and it won't work if my code on every form's close event doesn't type SHIFT+F6 (number of times depends on cases that I described above) to activate the last focused form so it can be selected and that ribbon code can close it.
Yeah, I know about the modal option and it works how it should work (it focuses the form that opened the modal form), and then I do not use the "SHIF+F6" code on OnClose event on my forms (if the form is modal), because it then shifts focus to something else.
I can't use modal on every form because user needs to open multiple windows to work in the app. I can use it sometimes when I need from user to close that form, so I won't allow the user to interact with somethin else before he's done with the modal form.
I thought maybe there is a setting in MS Access (I have 2021), that will do this natively. I saw that in older versions of MDE and MDB files and it works perfectly (all events trigger correctly, and user can use ribbon or menu bar to close the currently active window). I think it's 2007 and 2010 office, I'm not sure.
Don't get me wrong, my solution works (somewhat, if we exclude the lack of triggering the events like Form_GotFocus, Form_LostFocus, Form_Activate), but I still refuse to believe that this can't be done natively in this day and age, as I've said above.
Any idea?