>FOR iCount = 1 TO ('loObj'+LTRIM(STR(m.jx+1))).FieldCount >You can not use name expression to get a value, you need to use EVALUATE in your case:
with evaluate('loObj'+LTRIM(STR(m.jx+1)) for iCount = 1 to .FieldCount ... endwithYou can also use
lnFields = GetPem('loObj'+LTRIM(STR(m.jx+1)), 'FieldCount')