Disable buttons after click

R

rascal

I have some buttons on a form labeled Time In, Time Out, what I would like to
do is disable the button after it has been pressed. Is this possible and if
so how. Thanks for any help or suggestion you can give me.
 
M

Maurice

Well couple of things you have to reconsider on this one. When you disable
the button would you want it to be enable it again at some point? When and
before you can disable a button you'd have te set the focus to another
control before disabeling the button.

You could use a checkbox or textbox on your form. Hide this and when you
press/click the button you can assign a value to the checkbox. You can then
check the value of the checkbox/textbox to disable the button. However if you
want it to be saved you have to store the value somewehere otherwise the next
time you open the form the checkbox/textbox is reset to it's original value
again. You migth also think of storing the value in a tag of a control and
use that as a checkpoint. That way you have the storage you might be looking
for as well.

Remember to set the focus to another control before disabeling the button.

hth
 
Top