>Hi,
>
>Is the following a bug or am I just requiring to much?
>
>I have a commandbutton where Enabled = .F.
>
>I can't execute the click() event when I click the button, but I can execute the .click() event from my Form.Keypress() event.
>
>I would say that this should not be possible.
I think you are requiring too much. ;-)
The reason I say this is I believe you are assigning too much intelligence to the inherent control. When you click on a commandbutton the Click event fires. The Click
event knows to immediately run the Click
method. The method is what you add code to in the property sheet; you don't add code to the event itself.
The only thing that disabling a control does is disable the events associated with it. You can still manually call any method of it and unless you build the intelligence into your code to check the Enabled property, it doesn't care.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao