Lparameters tcField, tcValue Local lcContainer lcContainer = 'Thisform.Container1.container' + tcField + '.Controls' For each loControl in &lcContainer If Upper(control.baseclass) = 'CHECKBOX' and Upper(tcValue) $ Upper(loControl.caption) loControl.value = 0 loControl.enabled = .f. EndIf EndForIt gives a "Nesting Error" messagebox *AT THE END* of the first pass through the loop. I can see in the debugger that “control” has been resolved as the first item in the collection of Controls and that it has made it to the EndFor line when the error message appears.
For each control in (lcContainer) ... EndForWhat's the difference here in () vs. &