>In the refresh() method of the form you can write something like this:
if {condition where button should be enabled}
> thisform.cmdButton1.enabled = .T.
>else
> thisform.cmdButton1.enabled = .F.
>endif
Call thisform.refresh() whenever necessary and the button will be enabled or disabled according to the condition specified.
>
And for the lazy people who realize that if checks a logical condition:
thisform.cmdButton1.Enabled =
{condition where button should be enabled}>
>>I have a form that has nine options (buttons) on it. I use this form in two different places. all of the buttons apply in one place but only nine apply in the other. I have seena command that lets you enable or diable a button through code. The default for the button is Enable=.F. I am not sure how to use the "Object.Enable" command. Any idea how to do this?
>>
>>Thanks in advance for your help.
>>
>>Randall