>VFP5
>
>I have some checkbox controls in a Container-based Business Object. They are numbered sequentially Check1, Check2, etc.
>
>I need to process these sequentially and enable or disable them appropriately. I'd like to use a FOR loop but the method I'm using to get an object reference to each checkbox seems kludgy. Can anyone see a better way?
LOCAL ;
> lcCheckBoxName, ;
> loCheckBox
>
>FOR lnIx = 1 TO SomeNumber STEP 1
> lcCheckBoxName = "This.Check" + LTRIM(STR(lnIx))
> loCheckBox = &lcCheckBoxName
> * Name expression or EVALUATE() don't work in above line
>
>ENDFOR
FOR lnIx = 1 TO SomeNumber STEP 1
with eval( "This.Check" + LTRIM(STR(m.lnIx)) )
endwith
ENDFOR
Cetin