-
Disable command button
I want to disable a command button if the user clicks on any part of the form or any control on the form, other than this one command button. Do I have to trap the mouse down, maybe with an API, and see where it is and if it is not above the command button, then disable it?
If not this way, how can I do this?
Thanks
aikidokid
-
Depending on which way you want to go, you can use several different methods such as Keypress, Keydown, MouseOver, etc.
However, you have to use the method for each instance that will disable the command button. For example:
Private sub Form_Keypress( xxxxx)
me.CommandButton.enabled = False
end sub