When I read the help on FOR-EACH I didn't find anything only providing 'read-only' access. Is it buried somewhere or did I simply miss it?
And, once again, thanks for your help.
.....Rich
>The FOR EACH loop provides 'read-only' accesss.
>In case of arrays, it's the same as
>
>*FOR EACH scode IN thisform.aStatuscodes
>FOR i=1 TO ALEN(thisform.aStatuscodes)
> scode = thisform.aStatuscodes[i]
>...
>
>
>
>>
>>SELECT key1,key2 FROM lookup WHERE typename="ECO-STATUS" ORDER BY key2 INTO ARRAY thisform.aStatuscodes
>>FOR EACH scode IN thisform.aStatuscodes
>> scode = TRIM(scode)
>>ENDFOR
>>
>>My expectation was that
scode would now be reflected back into the form's array property. I can see
scode changing each time, but when the loop is done, the array is unchanged.
>>
>>I know I how to re-write this using ALEN(), but could somebody explain why the FOR-EACH code is not working and how to use it to update the values in the array?