Preventing user input While file operations are running

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
It depends on what you mean by "file operations". Can you give us a little
more information, and perhaps post some of your code?
 
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?

Graham Mandeno said:
It depends on what you mean by "file operations". Can you give us a little
more information, and perhaps post some of your code?
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?
 
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 :-)
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?

Graham Mandeno said:
It depends on what you mean by "file operations". Can you give us a
little
more information, and perhaps post some of your code?
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?
 
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).

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Graham Mandeno said:
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 :-)
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?

Graham Mandeno said:
It depends on what you mean by "file operations". Can you give us a
little
more information, and perhaps post some of your code?
--
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?
 
Interesting. Thank you gentlemen. Very much appreciated.



Graham Mandeno said:
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).

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Graham Mandeno said:
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 :-)
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?
--
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?
 
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! :-) )
--

Ken Snell
<MS ACCESS MVP>


Graham Mandeno said:
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).

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Graham Mandeno said:
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 :-)
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?
--
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?
 
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!

--

Ken Snell
<MS ACCESS MVP>

Graham Mandeno said:
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).

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Graham Mandeno said:
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 :-)
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

faberk said:
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?
--
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?
 
Back
Top