Solved

How to make a button one click only

Posted on 2013-05-15
2
369 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 119

Accepted Solution

by:
Rey Obrero earned 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now