Hi Chuck,
If you want to study, you can start from some samples, which shipped with VFP (in sampes directory). I could not say, it's the best code (what's why you can rarely see them in serious applications), but it's a good place to start learn some conceptions.
Instead of the code bellow, BTW, you can use this: (increases Readability)
With ThisForm.Commandgroup1
store .f. to .command1.enabled, .command2.enabled
endwith
for i=3 to 9
store .t. to ('ThisForm.Commandgroup1.command'+transfrom(i)+'.enabled')
next
>=TableRevert(.T.)
>ThisForm.Commandgroup1.Command1 = .F.
>ThisForm.Commandgroup1.Command2 = .F.
>ThisForm.Commandgroup1.Command3 = .T.
>ThisForm.Commandgroup1.Command4 = .T.
>ThisForm.Commandgroup1.Command5 = .T.
>ThisForm.Commandgroup1.Command6 = .T.
>ThisForm.Commandgroup1.Command7 = .T.
>ThisForm.Commandgroup1.Command8 = .T.
>ThisForm.Commandgroup1.Command9 = .T.
>LOCATE
>ThisForm.Refresh
>
>This above is the code I have in the 'Revert' button I created. What is wrong here? The error message says 'COMMAND1 is a method, event, or object'.
>
>Chuck
If it's not broken, fix it until it is.
My Blog