Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

in22

Registered User.
Local time
Today, 04:53
Joined
Aug 16, 2013
Messages
38
Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

Hi,

I have a form that loads when the database is open, and the form has buttons etc. that leads to queries and reports in the database. (Queries open in a form). Since most queries take a while to load, I was wondering if there is a way to Pop up a message box stating "Please Wait, Query is running..." (or something like that), and once the form opens the MsgBox should close automatically. (The user should not have to hit Ok button.)

Most users of this database would have restricted access such that they would not have navigation pane and toolbar visible - hence I want to make it a touch more interactive when a process is running...also if someone is new to access they might not notice that taskbar status and I don't want them thinking the program is stuck etc..

Would appreciate any help on this. I have tried numerous google searches but can't quite find what I'm looking for. :banghead:
 
Re: Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

Rather than a message box, place a label on the form where the button is and add some text to like Query is running and then name the label lblMessage and then make the property visible to false. Then with the code you have behind your button when clicked make the label visible and then run the code and after make the label visible = false
 
Re: Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

Hello,
Here is a DB for sample with 2 forms implementing a ProgressBar (One with the ProgressBar and a second for testing this) that you can adapte in your case I think.

Hope it can help you
 

Attachments

Re: Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

The problem with trying to use the built in Access message box (Msgbox) is that your code will be halted at the point of pop-up and won't continue until you click on Yes/No/Cancel etc, but there's nothing to stop you creating you own form displaying the message you want which will open and close at a specified point in your code execution. Messages can be displayed using text box(es) and the text can be set/changed in your code as each query executes
"Please Wait, Query X is running..." make sure you use the Repaint method each time you want to change the text display

David
 
Re: Pop up a "Process Running" MsgBox and Close Automatically on Process Execution

@madefemere

The file you shared is exactly what I need. I have a quick question: So the button is supposed to open a query and has 2 lines of code. Should I insert those 2 lines as following:

...Forms("FormProgressBar").lblProgressBar.Width = 0
' Necessary to let Windows continues working
DoEvents

' The looping - ' YOUR CODE INSERT THE CODE HERE?

For lCptIteration1 = 1 To lNbIterations
For lCptIteration2 = 1...
 

Users who are viewing this thread

Back
Top Bottom