How to disable keyboard and mouse?

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

Paul

I have an event in a form which processes several functions in a module and
it could take up to 1-2 seconds to complete. Once it is completed, a message
will pop up to notify the user and the user click "ok" on the message and
the entire process is completed. The problem is user click on the "return"
button on the keyboard before the entire process (opo up message) is
appeared. As a result the code is breaking half way through it. Is there a
way I can disable the keyboard or the mouse temporary? Thanks
 
Yes, there is.

DoCmd.Hourglass True
and
DoCmd.Hourglass False

Be sure to include the False part in your error handler also so that you
will release the keyboard and mouse if an error should occur that the user
needs to respond to.
 
Back
Top