BadSikander
Registered User.
- Local time
- Today, 11:04
- Joined
- Jan 19, 2007
- Messages
- 31
Hello.
Is there any way to have a VB timer event check to see if a message box is open in the database before it runs?
I have a switchboard form that is always open in the background and it runs a regular timer event. I've noticed that on other forms, any message box appearing can cause problems.
e.g. Form2 has an event that does:
MsgBox "Hello"
DoCmd.Close
If the switchboard timer event runs whilst a user is staring at this msgbox the focus seems to have shifted to the switchboard by the time they press the OK button. DoCmd.Close is then applied to the switchboard instead of Form2.
I was hoping to avoid having to find every message box and ensuring the correct form is actually named in all subsequent commands. I thought it would be a lot simpler if I could just prevent the timer event running if a msgbox is open somewhere, but don't know how to have it check.
Thanks for any help.
Is there any way to have a VB timer event check to see if a message box is open in the database before it runs?
I have a switchboard form that is always open in the background and it runs a regular timer event. I've noticed that on other forms, any message box appearing can cause problems.
e.g. Form2 has an event that does:
MsgBox "Hello"
DoCmd.Close
If the switchboard timer event runs whilst a user is staring at this msgbox the focus seems to have shifted to the switchboard by the time they press the OK button. DoCmd.Close is then applied to the switchboard instead of Form2.
I was hoping to avoid having to find every message box and ensuring the correct form is actually named in all subsequent commands. I thought it would be a lot simpler if I could just prevent the timer event running if a msgbox is open somewhere, but don't know how to have it check.
Thanks for any help.