Message boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to close open message boxes programmatically before forcing
a database to quit?

Thanks in advance
Dave
 
Ofer Cohen said:
You can create a Form that looks like a message box, open it with the
message, and use the form timer to close it.

check this link on how to create a form that can replace a message box

http://www.applecore99.com/dld/dld002.asp

Replacing all of Access's notifications along with all the existing custom
message boxes with custom made forms would be a fairly large task. I just
want a hidden form to check for any system messages and close them before
forcing a shut down. At the moment, system messages left open during a forced
shutdown are creating lost instances of Access which can only be terminated
in Task Manager.
 
Dave said:
Replacing all of Access's notifications along with all the existing custom
message boxes with custom made forms would be a fairly large task. I just
want a hidden form to check for any system messages and close them before
forcing a shut down. At the moment, system messages left open during a
forced
shutdown are creating lost instances of Access which can only be
terminated
in Task Manager.

No offence Dave but I have to say I'm at a loss to imagine a scenario where
a message box would pop up without user-interaction. Perhaps you could
elaborate on the circumstances and someone might be able to suggest a
workaround. Maybe it's a question of educating users about the perils of
leaving their machine with a message box unchecked.

Regards,
Keith.
www.keithwilby.com
 
Keith Wilby said:
No offence Dave but I have to say I'm at a loss to imagine a scenario where
a message box would pop up without user-interaction. Perhaps you could
elaborate on the circumstances and someone might be able to suggest a
workaround. Maybe it's a question of educating users about the perils of
leaving their machine with a message box unchecked.

Regards,
Keith.
www.keithwilby.com

Hi Keith,
No offence taken. Like you, I'm at a loss also.
In a nutshell, our environment allows for very basic data entry on the shop
floor by the shop staff : 100+ of them logging in to dozens of terminals.
They're great at their given trade, but their understanding of IT systems is
low. As a result, they will wander off without clicking 'Yes', 'No' or
'Cancel' when a prompt is on the screen. They've been instructed to address
all such prompts, but it's still a requirement that the system checks for
these message boxes first before forcing a shutdown.
Hopefully someone has a good solution.
Thanks
Dave
 
Dave said:
they will wander off without clicking 'Yes', 'No' or
'Cancel' when a prompt is on the screen. They've been instructed to
address
all such prompts, but it's still a requirement that the system checks for
these message boxes first before forcing a shutdown.
Hopefully someone has a good solution.

Hmm ... AIUI message boxes of a modal nature which means that code execution
is suspended until the box is dismissed so I *think* a coded solution is a
no-no.

Keith.
 
Dave,
Do a search in this forum for "inactivity". You will see three postings for
detecting user inactivity. Assuming your app has a FE and BE, you could check
for "inactivity" on each " terminal" and quit the app. This might be
something you could try.
 
paddyIE said:
Dave,
Do a search in this forum for "inactivity". You will see three postings for

Hi Patrick,
Thanks for your reply.
My system does employ BE/FE and already has a user inactivity process. This
is what triggers the forced shutdown mentioned above. No user inactivity
process that I've seen so far handles closing message boxes.
Thanks for your link, but it produces the same error I'm getting now. To
reproduce what I'm seeing, download the file from your link and do the
following:
Open frmLogOffafterNonuse in design view.
Open the Properties for the first text box and enter this for the On Got
Focus event:
Private Sub Text6_GotFocus()
Msgbox "Sample message to emulate problem"
Call UpdateActivity
End Sub

Change to form's TimerInterval property to a smaller interval to speed
things up a little if you like.

Now open the form and click in the first text box. When the message box
appears, DON'T close it. Allow it to sit on the screen until the shutdown
process kicks in. You'll now see that you've got an instance of Access in
your task bar that can't be closed. I'm using A97 on Win2K and it happens
every time a message box is left unattended. Only way to close it is through
Task Manager. That's not so bad, unless Group Policy disables Task Manager,
then it's a bigger problem.
Dave
 
Back
Top