Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to close Msgboxes and Inputboxes via code

Posted on 2011-09-30
8
Medium Priority
?
242 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
Technology Partners: 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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: …

618 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