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.
>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
Rick Borup, MCSD
recursion (rE-kur'-shun) n.
see recursion.