Please help on how to show a busy message like "Please wait" or a "analytical animated watch" in ms access when a process in running.
How to pop up "Busy Message" while running a process in ms access
Collapse
X
-
You need to identify the event which starts the process - clicking a control on a form, or whatever. In the VBA code for that event you simply add:
.Code:msgbox("BUSY RUNNING PROCESS")
This will cause a small window to appear, which the user can close by clicking on the OK button. You can make the msgbox function more complex. Try searching the VBA Help file for details. -
We can pop up the msg through msgbox option. but it will pop up with "OK" button and it will go off once the ok button clicked. then only the next line of code will be executed.
My expectation is to pop up that msg without "OK" button option and that msg should be there until the current running process completes, then automatically the msg should go off.
It is nothing but when a query or long process is running in system at the time our cursor symbol will change to "busy" mode. Thats i want as msg in our ms access, nothing else than that.Comment
-
Normal way is:Originally posted by yuvangPlease help on how to show a busy message like "Please wait" or a "analytical animated watch" in ms access when a process in running.
This will appear on the status bar at the bottom left of the screen.Code:Dim statusmsg as Variant statusmsg = SysCmd(acSysCmdRemoveMeter) statusmsg = SysCmd(acSysCmdSetStatus, "Posting invoices to ledgers, please wait.")
Gaz.Comment
-
Have whatever process you start set a global variable and open a custom form. Have it unset the variable when the process is done running.
Use the on timer event of the custom form to monitor the status of the global variable and to close the form when it's unset.Comment
-
Create a standard module and declare a public variable at the topOriginally posted by yuvangCan you please provide an example........ ...
In your process code put this at the topCode:Public YourVar as string
And this at the exit pointCode:YourVar = "running" Docmd.openform "YourFormName"
In the forms on timer event put thisCode:YourVar = ""
Code:If YourVar = "running" Then Exit Sub Else Docmd.close End IfComment
-
Hi i have done that but still that is not working to me....
Let me explain what i have done...
i kept the below line
in a moduleCode:Public YourVar As String
then the
in a on (Opens a form)click process in the same at the last i keptCode:YourVar = "Please Wait"
Code:YourVar = ""
then i kept the below code in same form's timer
Code:If YourVar = "Please Wait" Then Exit Sub Else DoCmd.Close End IfComment
-
Hi,Originally posted by yuvangCode:If YourVar = "Please Wait" Then Exit Sub Else DoCmd.Close End If
Looks like you need to reset the timer:
Also make sure its switched on to begin with.Code:If YourVar = "Please Wait" Then Me.TimerInterval = 1000 Exit Sub Else DoCmd.Close End If
Find the Form's "Timer Interval" property and put 1000 in there. This equates to one second, if memory serves.
So the above will run every one second until the variable is off, at which point the timer is not reset and the form closes.
GazComment
-
Create a standard module and name it anything you want. Using VBA editor declare your public variable (whatever name you want) at the top of the module.Originally posted by yuvangYou have given some code. But i am not clear that where i need to use them. So that i am not able to get any output. could you please clarify that ?
Using VBA editor edit the process you want the popup for and set your variable to = "Please Wait" and DoCmd.openform "Your Message Form" at the start of the process module. At the end of the process module set your variable back to nothing "".
In your message form properties change the timer value to 1000, in the on timer event add the code that was provided.
I'm sorry if I'm not explaining this clear enough for you but I've never been accused of being a good instructor. If it's still unclear what you need to do, maybe someone else can explain it better than I.Comment
-
Let me explain about my mdb.
It has a form “A” and there is a button to open another form “B”. While opening the form “B” it getting very late. So that what I want to display a message as “Please Wait”. The message should be there until the form “B” opens.
To this what I need to do. Please explain…..Comment
-
Can I just ask why form "B" is taking so long to open? What does it do?Originally posted by yuvangLet me explain about my mdb.
It has a form “A” and there is a button to open another form “B”. While opening the form “B” it getting very late. So that what I want to display a message as “Please Wait”. The message should be there until the form “B” opens.
To this what I need to do. Please explain…..
How often (if ever) do you Compact & Repair the .mdb?Comment
-
Hi
Can I just ask why form "B" is taking so long to open? What does it do?
Ans: The form "B" is having so many queries and 30 subforms, where i controlled them through visibilities.
How often (if ever) do you Compact & Repair the .mdb?
Ans: I am not Compact & Repair the mdb, once i post that to production server. are there any possibilities to that automatically.. ......Comment
Comment