Disable buttons after click

  • Thread starter Thread starter rascal
  • Start date Start date
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top