By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,215 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,215 IT Pros & Developers. It's quick & easy.

How to pop up "Busy Message" while running a process in ms access

P: 20
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.
Oct 7 '08 #1
Share this Question
Share on Google+
14 Replies


P: 69
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:

Expand|Select|Wrap|Line Numbers
  1. 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.
Oct 8 '08 #2

P: 20
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.
Oct 17 '08 #3

GazMathias
Expert 100+
P: 200
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.
Normal way is:

Expand|Select|Wrap|Line Numbers
  1. Dim statusmsg as Variant
  2.  
  3.     statusmsg = SysCmd(acSysCmdRemoveMeter)
  4.     statusmsg = SysCmd(acSysCmdSetStatus, "Posting invoices to ledgers, please wait.")
This will appear on the status bar at the bottom left of the screen.

Gaz.
Oct 17 '08 #4

P: 20
I have removed the status bar in "StartUp". So if that is like Message will look good........
Oct 17 '08 #5

DonRayner
Expert 100+
P: 489
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.
Oct 17 '08 #6

P: 20
Can you please provide an example...........
Oct 17 '08 #7

DonRayner
Expert 100+
P: 489
Can you please provide an example...........
Create a standard module and declare a public variable at the top

Expand|Select|Wrap|Line Numbers
  1. Public YourVar as string
  2.  
In your process code put this at the top

Expand|Select|Wrap|Line Numbers
  1. YourVar = "running"
  2. Docmd.openform "YourFormName"
  3.  
And this at the exit point

Expand|Select|Wrap|Line Numbers
  1. YourVar = ""
  2.  
In the forms on timer event put this

Expand|Select|Wrap|Line Numbers
  1. If YourVar = "running" Then
  2.     Exit Sub
  3. Else
  4.     Docmd.close
  5. End If
  6.  
Oct 17 '08 #8

P: 20
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

Expand|Select|Wrap|Line Numbers
  1. Public YourVar As String
in a module


then the



Expand|Select|Wrap|Line Numbers
  1. YourVar = "Please Wait"
in a on (Opens a form)click process in the same at the last i kept


Expand|Select|Wrap|Line Numbers
  1. YourVar = ""

then i kept the below code in same form's timer

Expand|Select|Wrap|Line Numbers
  1.  If YourVar = "Please Wait" Then
  2.      Exit Sub
  3.  Else
  4.      DoCmd.Close
  5.  End If
  6.  
Oct 17 '08 #9

GazMathias
Expert 100+
P: 200
Expand|Select|Wrap|Line Numbers
  1.  If YourVar = "Please Wait" Then
  2.      Exit Sub
  3.  Else
  4.      DoCmd.Close
  5.  End If
  6.  
Hi,

Looks like you need to reset the timer:

Expand|Select|Wrap|Line Numbers
  1.  If YourVar = "Please Wait" Then
  2.      Me.TimerInterval = 1000
  3.      Exit Sub
  4.  Else
  5.      DoCmd.Close
  6.  End If
  7.  
Also make sure its switched on to begin with.

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.

Gaz
Oct 17 '08 #10

P: 20
You 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 ?
Oct 20 '08 #11

DonRayner
Expert 100+
P: 489
You 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 ?
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.

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.
Oct 20 '08 #12

P: 20
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…..
Oct 20 '08 #13

GazMathias
Expert 100+
P: 200
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…..
Can I just ask why form "B" is taking so long to open? What does it do?

How often (if ever) do you Compact & Repair the .mdb?
Oct 20 '08 #14

P: 20
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........
Oct 21 '08 #15

Post your reply

Sign in to post your reply or Sign up for a free account.