Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to make a button one click only

Posted on 2013-05-15
2
Medium Priority
?
417 Views
Last Modified: 2013-05-15
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.
0
Comment
Question by:garycoon7
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39169966
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
 

Author Closing Comment

by:garycoon7
ID: 39169997
Thank you for the help and your speedy response.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question