Solved

How to close Msgboxes and Inputboxes via code

Posted on 2011-09-30
8
234 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 500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Parameter Query 33 52
Runtime Error -2147467259 (80004005) 7 50
Sharepoint list to Access database 9 52
Access Runtime Error '3070' 5 7
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…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

726 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