>I have a command group with a dozen command buttons. How can I reference these in an "array stle" method. I want to disable the command buttons based on a certain criterai. In other words...
>
>For i = 1 to 12
> if i = 7 && Example
> thisform.commandgroup1.cmd7.enable = .f.
>endif
>
>
>What do I replace the "thisform.commandgroup.cmd7.enable" with to disable the seventh item of the command group???? Thanks for your help.
>
>j. flick
Jamie,
You can use the Buttons collection property of the commandgroup;
FOR EACN oButton IN THISFORM.CommandGroup1.Buttons
IF oButton.Name = "cmd7"
oButton.Enabled = .F.
ENDIF
ENDFOR