Prevent repeat command button click

rpadams

Registered User.
Local time
Yesterday, 20:16
Joined
Jun 17, 2001
Messages
111
I have a command button that runs an append query in its On_Click event. I need to make sure it is only clicked once. I've tried to make the button disabled or invisible, but I get the error message that I can't do that with the focus on the control. I'd like a simple solution that doesn't make me change focus. Ideally, the user would click it once and it would be invisible until other parameters are reset before it can be used again.
 
rpadams said:
I'd like a simple solution that doesn't make me change focus.
Why?

You will have to set the focus to another field or button, etc. before you can disable or hide the button [that has the focus because of the OnClick event] that you do not want the users to click again until you are ready for them to do so.
 
You could overlay your button on another so that your append button is on top. After the append is run, set focus to the second button and make the first invisible. Set the second button to pop up a message box explaining that the users has to do X,Y,Z before the append can be re-run.
 

Users who are viewing this thread

Back
Top Bottom