Echo vs Hourglass

  • Thread starter Thread starter Paul Mak
  • Start date Start date
P

Paul Mak

I need to disable the keyboard and the mouse temporary on an event as this
event takes more than several seconds to complete. I am not sure if I should
use echo or hourglass method (What is the different between the two?) .
Thanks. I have tested the hourglass method, I put the following line of code
Msgbox "Test" after the hourglass is set to true and I am able to use the
mouse or the keyboard to select the "OK" button on the message.
 
Paul Mak said:
I need to disable the keyboard and the mouse temporary on an event as
this event takes more than several seconds to complete. I am not sure
if I should use echo or hourglass method (What is the different
between the two?) . Thanks. I have tested the hourglass method, I put
the following line of code Msgbox "Test" after the hourglass is set
to true and I am able to use the mouse or the keyboard to select the
"OK" button on the message.

Hourglass doesn't prevent user actions; it just changes the cursor to
an hourglass so that the user knows she's supposed to wait. Echo keeps
Access from updating the screen, but also doesn't prevent Access from
responding to user actions, event if the user can't see the response.
Neither one of these actions disables the keyboard and mouse, and
there's normally no need to do so.

For long-running processes, I generally put up a "Please Wait..." form,
with or without a progress bar, and set the mouse pointer to an
hourglass. Often the form will also have a Cancel button, the clicking
of which sets a variable that I check inside my processing loop to see
if the loop should terminate early. Incidentally, that means I have to
use the DoEvents statement at intervals within my loop to all mouse
events to be processed.
 
Hi,
IN addition to what Dirk said, it's up to you to disable anything that shouldn't be clicked while while your process is running,
then enable them when finished. So in other words, disable any buttons you don't want clicked and then enable them afterwords.
 
Thank you for your reply.

It is an excellent solution to put up the "Please wait..." form. I wonder if
I set this form as a "Pop up" and "Modal" with one label on it saying
"Plaese wait..." and this form will be opened in the beginning when Access
processing the codes and it will be closed when Access finished the
long-running process. Therefors during the long-running processes, user
actions (keyboard or mouse) is acting on this "Please wait..." form and it
will not affected the coding at the other form.
 
Thank you for your reply.

It is an excellent solution to put up the "Please wait..." form. I wonder if
I set this form as a "Pop up" and "Modal" with one label on it saying
"Please wait..." and this form will be opened in the beginning when Access
processing the codes and it will be closed when Access finished the
long-running process. Therefors during the long-running processes, user
actions (keyboard or mouse) is acting on this "Please wait..." form and it
will not affected the coding at the other form.

Hi Paul,

I've used a "Please wait..." form before as Yoda suggested.
Here are some ready-made instructions if you would like to try:

ACC97: How to Create a "Please Wait" Message
http://support.microsoft.com/?id=96989

ACC2000: How to Create a "Please Wait" Message
http://support.microsoft.com/?id=209608

ACC2002: How to Create a "Please Wait" Message
http://support.microsoft.com/?id=290133
 
It is an excellent solution to put up the "Please wait..." form. I wonder if I
set this form as a "Pop up" and "Modal" with one label on it saying "Plaese
wait..." and this form will be opened in the beginning when Access processing
the codes and it will be closed when Access finished the long-running process.
Therefors during the long-running processes, user actions (keyboard or mouse)
is acting on this "Please wait..." form and it will not affected the coding at
the other form.

Do *not* make the form Modal or your application will be frozen in limbo as all
operations within the application will be halted.
 
What is the different between "Pop up" and "Modal" and what do they do?

PopUp will cause the form to remain in front of all other non-popup forms
regardless of which might receive the focus. Modal will halt all activities
outside of the modal form until that form is closed or its modal property is set
to false (this will happen if the form is hidden, also).
 
Bruce M. Thompson said:
Do *not* make the form Modal or your application will be frozen in
limbo as all operations within the application will be halted.

No, it's okay for the form to be Modal. That's not the same as opening
the form in dialog mode, and code running behind the scenes will
continue to run while the form is open.
 
No, it's okay for the form to be Modal. That's not the same as opening
the form in dialog mode, and code running behind the scenes will
continue to run while the form is open.

Sorry about that. I don't know that I was ever aware there was a difference in
that respect. Of course, I never set the modal property of a form from within
its property sheet, but I just presumed that, because MS help recites that
opening a form in dialog mode sets both the modal and popup properties to true,
both approaches provided much the same result.

Thanks for that, Dirk. <s>
 
Bruce M. Thompson said:
Sorry about that. I don't know that I was ever aware there was a
difference in that respect. Of course, I never set the modal property
of a form from within its property sheet, but I just presumed that,
because MS help recites that opening a form in dialog mode sets both
the modal and popup properties to true, both approaches provided much
the same result.

It seems that there's "modal" and then there's *modal*. I don't really
understand the difference.
 
Back
Top