ThePris6ner
New member
- Local time
- Today, 22:22
- Joined
- Aug 13, 2018
- Messages
- 3
Hi all,
My question is: Can vba tell me which forms or reports are currently open in MS Access?
Further explanation:
I have an Access 2007 database, and I have been tasked with solving the issue where users accidentally close Access by clicking the red X in the top right hand corner. This usually occurs when a user is viewing a report and they wish to close it. Instead of clicking the 'Close Print Preview' button they instinctively go for the red X.
I first looked into disabling the red X, and this can be done with code, but I am reluctant to do it. The reason being that I don't want users getting stuck without any way of closing access. This could happen if there is an error or for some other reason, the get stuck in a dead end.
The other option I have thought of, is writing code that looks at which forms are open when the user tries to close access. If there are any reports open, a message box alerts them and asks them if they wish to close access.
Which leads to my question: Is there vba code which can tell me the names of all the open forms or reports?
I know I can ask 'is a form loaded', but I have so many forms, I cant do this for all of them.
I would be grateful for any help or advice
My question is: Can vba tell me which forms or reports are currently open in MS Access?
Further explanation:
I have an Access 2007 database, and I have been tasked with solving the issue where users accidentally close Access by clicking the red X in the top right hand corner. This usually occurs when a user is viewing a report and they wish to close it. Instead of clicking the 'Close Print Preview' button they instinctively go for the red X.
I first looked into disabling the red X, and this can be done with code, but I am reluctant to do it. The reason being that I don't want users getting stuck without any way of closing access. This could happen if there is an error or for some other reason, the get stuck in a dead end.
The other option I have thought of, is writing code that looks at which forms are open when the user tries to close access. If there are any reports open, a message box alerts them and asks them if they wish to close access.
Which leads to my question: Is there vba code which can tell me the names of all the open forms or reports?
I know I can ask 'is a form loaded', but I have so many forms, I cant do this for all of them.
I would be grateful for any help or advice