Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Multiple click of cmd button until code executes

Status
Not open for further replies.

marcin2k

Programmer
Jan 26, 2005
62
CA
Hello,
I have a command button that reads data from my scale, this process takes about 2 seconds so I would like to make it that the user cannot accidently click the button again until the code finishes executing or else it will give an error. I know that it does not allow the disable a button when u press it is there any way of doing this?

Thanks
 
You should be able to disable the button after hitting it, the trick is to set focus to another control first.

[tt]me!txtSomeOtherControl.setfocus
me!cmbSomeCommandButton.enabled=false[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top