>>>I have about 20 labels on a form for credits and thay are aptly named
>>>LBLCREDIT11,LBLCREDIT21,LBLCREDIT31......LBLCREDIT21 and all the captions are the same, the word "credit". I want to use setall to chg them to another caption, "AMT" for example. I do not want to mess with various other labels on this form however.
>>
>>for lnI = 1 to 20
>> store 'new caption' to ('thisform.lblCredit' + transform(m.lnI))
>>next
>>
>>If they are on a different pages, then it would be harder if they are not based on some extra class.
>
>Naomi, Upon re examine my labels are named following( my mistake)LBLCREDIT11,LBLCREDIT21,LBLCREDIT31, LBLCREDIT41....etc
>I have this line for testing
>abc=1
> store 'AMT' to ('thisform.lblCredit1' + transform(m.kkk))
>but it bombs out.
Ok, let's try something simpler:
for each oCtl in thisform.controls foxobj
if octl.baseclass="Label" and lower(octl.caption)=="credit"
oCtl.caption="AMT"
endif
endfor