How to make a button one click only

How would I make a button work only one time? This would stay in effect until the form was closed and then the button would reset.
garycoon7Asked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
using the click event of the button

private sub cmdBtn_click()

'the codes you want to run goes here

'set the focus to any other control
me.controlname.setfocus

'disable the cmdBtn

me.cmdBtn.enabled=false

end sub
0
 
garycoon7Author Commented:
Thank you for the help and your speedy response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.