Re: Allow routine to finish when called multiple times
- From: "Arvin Meyer [MVP]" <a@xxxxx>
- Date: Fri, 24 Aug 2007 05:25:52 -0400
The advantage to do it this way is that it provides positive feedback to the
user. He/she soon learns not to even try to click the button continuously.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"SandyGrzesik" <SandyGrzesik@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A4110A42-37B5-4155-A388-4621AF533E3C@xxxxxxxxxxxxxxxx
I may have to do this, but I was hoping for a different solution.
Thanks for your input!
Sandy G.
"Arvin Meyer [MVP]" wrote:
I once had a user that pressed a bulk email button continuously and wound
up
spamming our customers to death. I set focus to a different control, then
disabled the button. You must do something similar (aircode):
Sub cmdWhatever_Click()
Me.SomeOtherControl.SetFocus
Me.cmdWhatever.Enabled = False
'Run your other code
'Tou may need a DoEvents here
Me.cmdWhatever.Enabled = True
End Sub
That should prevent any clicking on the button.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"SandyGrzesik" <SandyGrzesik@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0A2C8FA0-940D-4868-828B-1304EDFECC6D@xxxxxxxxxxxxxxxx
I have two forms. They can both be open at the same time. Form1 is the
driver form and has a "next" button. When pressed, it calls Routine1
which
reads the next set of data, populates the fields on Form1, then calls
Routine2 to populate the fields on Form2.
This works great until they start pressing the Next button really fast.
Routine2 doesn't finish processing each call and eventually an error is
generated, and the wrong data can be on Form2.
Is there any way to ensure that when calling Routine2, it is completed
before it is called again? Doesn't seem like this is a DoEvents issue,
but
any help would be greatly appreciated.
.
- Follow-Ups:
- Re: Allow routine to finish when called multiple times
- From: David W. Fenton
- Re: Allow routine to finish when called multiple times
- References:
- Re: Allow routine to finish when called multiple times
- From: Arvin Meyer [MVP]
- Re: Allow routine to finish when called multiple times
- Prev by Date: Pass infor from one form to another
- Next by Date: Re: Datediff function
- Previous by thread: Re: Allow routine to finish when called multiple times
- Next by thread: Re: Allow routine to finish when called multiple times
- Index(es):