?
Solved

How to close Msgboxes and Inputboxes via code

Posted on 2011-09-30
8
Medium Priority
?
237 Views
Last Modified: 2013-11-28
Is it possible to close Msgboxes and Inputboxes vai code?
0
Comment
Question by:Milewskp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 36893069
I don't think so. They are modal and require user interaction to close.  All code execution stops until manually closed.

Why would you need to do this?

mx
0
 
LVL 1

Author Comment

by:Milewskp
ID: 36893075
Hi mx,
I would like to expel stale users via code, but code won't run while a Msgbox or Inputbox is open.
0
 
LVL 75
ID: 36893149
"but code won't run while a Msgbox or Inputbox is open."
Right.  Exactly.  Once open, further execution of code halts. You're basically stuck.  Both are 'Access Modal' ... and in fact, can be made System Modal - a Message Box option.

It *might* ... be possible from another db if you could execute an Application.Quit that was in a Function in the target db ... but I don't think so.  You pretty much would have to Kill the process.

I have a pretty amazing Forced Shutdown module that is part of my automated backup app ... but that is the one glitch I've not been able to get around.  Fortunately, in 1.5 years, no user has left a db in a state wherein a MsgBox was open.

mx

mx
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:Milewskp
ID: 36893192
Hi mx,
<, in 1.5 years, no user has left a db in a state wherein a MsgBox was open>
Interesting, it happens all the time with my databases. Maybe because my error handler opens a msgbox(?)  (I've recently changed this, so that the user is informed by status bar text instead).

I use a forced shutdown module too. I'll open a new question so we can compare notes.

0
 
LVL 1

Author Comment

by:Milewskp
ID: 36893197
The only solution I can think of is to use custom forms instead of the built-in Msgbox and InputBox. Know of any?
0
 
LVL 75
ID: 36893212
Well ... You *could* ... create a custom msgbox ... with some sort of a timer option such that it would close after some duration with a default action.  But ... I'm not big on reinventing that wheel.

I took Peter's FSD free app (http://www.peterssoftware.com/fsd.htm) ... and rolled it into a full blown app that works very well.

I don't recall a custom msgbox 'form' right off, but of course there may be some.

mx

0
 
LVL 1

Author Closing Comment

by:Milewskp
ID: 36911752
Thanks mx.
0
 
LVL 75
ID: 36911766
You are welcome.

mx
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question