Borislav,
Thanks! I'm glad I did not remove the comments from the code before I posted the message. I may never have found the problem
Alan
>Alan,
>
>Theese rows are never executed because of comment "*" on the first row, in it you have ";" & that mean to VFP to remark all row(s) next that up to the first row that not ends with ";". If you using VFP 6.0 You never remark that, but in VFP 8 You can show that all rows bottom of
>
> * replace lcode with alltrim(upper(substr(ary(i,1),1,5))),;
>
>
>will be marked as commented rows