X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Stop Fast Repeated Mouse Click On Command Button, Access 2007    
post Mar 14 2018, 12:27 AM

Posts: 109
Joined: 19-July 11
From: India


This may be a simple issue, but confusing me ..

I am using a command button to navigate through records in a form ..
Working well ..
Form is also linked to subform .. and so some actions to perform ...

Some times on fast repeated clicks by mouse on above command button, ACCESS Staggers ...

To prevent this I can use a line ..
[CommandButton].Enabled = False
Some procedure ..
[CommandButton].Enabled = True

I need to know that, ...
Can it also be achieved by turning Echo Off .. and/or .. HourGlass On
(that is preventing the next click until the procedure is completed)

Go to the top of the page
post Mar 14 2018, 04:19 AM

Posts: 992
Joined: 26-March 08
From: London, UK

ACCESS Staggers ...

By that, do you mean that you get screen flicker?...

If so, Echo Off may work:

Echo Off
Echo On

As may:

Me.Painting = False
Me.Painting = True

This post has been edited by HairyBob: Mar 14 2018, 04:25 AM
Go to the top of the page
post Mar 15 2018, 12:13 AM

Posts: 109
Joined: 19-July 11
From: India

Yes it looks like ......

Let me clear it more ..

My Access database file is in a Pendrive ..

After giving a click on a COMMAND button,
due to time taking execution of a procedure (may be due to slow computer or a bad design),
it takes a second to completely execute the procedure given in SUB (say a series of Re-queries, record count, IF, some formula, etc).
Mean while If I click the same command button repeatedly very fast to repeat the same procedure, I observed that application hangs ..
This does not happen when I do it slowly (that is wait and then click again)..

Now my purpose is to temporarily disable the click response given by user on the same command button,
until the preceding execution of click procedure in SUB is completely executed.

As I said this can be achieved by just disabling the particular command button then again enabling it ...
But a control is not disabled when it has got focus. So I have to move the focus to some dummy control, then disable the said command button ..

Just to avoid all this ..
Is there better option ?? like as you said Echo off and On ; Paint Off , On, etc ..

(Hope I may have clearly mentioned)
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    12th December 2018 - 09:08 AM