Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Preventing user input While file operations are running

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
faberk - 05 Apr 2005 18:37 GMT
I have a command button which runs many file operations.  Is there a way to
prevent user input ftom the keyboard or mouse while the file updates, etc are
taking place?
Graham Mandeno - 05 Apr 2005 23:23 GMT
It depends on what you mean by "file operations".  Can you give us a little
more information, and perhaps post some of your code?
Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

>I have a command button which runs many file operations.  Is there a way to
> prevent user input ftom the keyboard or mouse while the file updates, etc
> are
> taking place?
faberk - 07 Apr 2005 10:45 GMT
Sorry Graham.  Was out for a day.

I have many sql append, update, deletes performed via the "docmd" command,
when a user clicks a command button.  I have noticed that while the code is
running, users have the ability to click other buttons and select other forms
etc.  I guess my first question is, if they accidentally click on other
command buttons, will that buttons function be executed after the current
operations are finished? or during?  My users have this mouse clicking
habit--when impatient , they are clicking on everything-a worldwide epidemic,
im sure.  I just want to prevent them from executing or selecting anything
until after the current operation is finished.  How can I do this?

> It depends on what you mean by "file operations".  Can you give us a little
> more information, and perhaps post some of your code?
> >I have a command button which runs many file operations.  Is there a way to
> > prevent user input ftom the keyboard or mouse while the file updates, etc
> > are
> > taking place?
Graham Mandeno - 07 Apr 2005 22:03 GMT
As far as I know, there is no way to prevent the user "clicking ahead".  The
only thing I can think of is to discourage this behaviour by setting the
mouse pointer to an hourglass for the duration of the operation.

However, I will do some more research to see if I can find a way, or perhaps
someone else might jump in here with a solution, so check back on this
thread in a couple of days for any updates :-)
Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

> Sorry Graham.  Was out for a day.
>
[quoted text clipped - 20 lines]
>> > are
>> > taking place?
Graham Mandeno - 08 Apr 2005 03:07 GMT
Still no known way to *disable* the click-ahead, but here are a couple of
possibilities:

1. Create a small form with a label on it: "Please wait... updates in
progress...".
   Put your code into the form's Load event, and when the code is complete,
have the form close itself.
   When you want to run the code, open the new form modally (by specifying
WindowMode:=acDialog)

2. Suggestion by fellow MVP Ken Snell:
   Put a "big" command button (transparent) over the entire area of the
form
   (or over the command buttons). Make the button invisible initially. When
   your code begins running, the first thing to do is make the transparent
   button visible and bring to front. With no event procedures on the
button,
   the user can click all he/she wants and nothing will get through. Make
the
   button invisible when the code is done.

3. Suggested by Ken Snell and "Sco" Scofield:
   Have the code disable the buttons as its first step, and then
   enable them when done. You could loop through the controls (use Tag
   property value or control type).

Signature

Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

> As far as I know, there is no way to prevent the user "clicking ahead".
> The only thing I can think of is to discourage this behaviour by setting
[quoted text clipped - 29 lines]
>>> > are
>>> > taking place?
faberk - 08 Apr 2005 03:43 GMT
Interesting.  Thank you gentlemen.  Very much appreciated.

> Still no known way to *disable* the click-ahead, but here are a couple of
> possibilities:
[quoted text clipped - 55 lines]
> >>> > are
> >>> > taking place?
Ken Snell [MVP] - 08 Apr 2005 03:43 GMT
Slight modification to #1. The form that you open needs to have its Modal
property set to Yes in the form's design view when you create the form. Then
it should be opened "normally" (WindowMode should be left empty as an
argument). Dialog mode will stop your code from running.

(thanks for the plugs, Graham!  :-)  )
Signature


       Ken Snell
<MS ACCESS MVP>

> Still no known way to *disable* the click-ahead, but here are a couple of
> possibilities:
[quoted text clipped - 57 lines]
>>>> > are
>>>> > taking place?
Ken Snell [MVP] - 08 Apr 2005 03:48 GMT
I cancelled a reply that I made to Graham's post, but in case it doesn't
cancel before everyone sees it, please ignore that post.... I misunderstood
what Graham wrote (I read too fast!) and my post is "not on point" to his
suggestion!

Signature

       Ken Snell
<MS ACCESS MVP>

> Still no known way to *disable* the click-ahead, but here are a couple of
> possibilities:
[quoted text clipped - 57 lines]
>>>> > are
>>>> > taking place?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.