>Hi. VFP6. I want to loop through fields 5-10 of the first record of my grid looking for matching criteria. I could write a great big Case statement, but I am thinking that a loop with macro substitition would be more efficient. The problem is that I do not know how to refer to the individual "cells" in a looping scenario.
>
>Thanks, Randy
Randy,
Normally it's eval(columns(5).controlsource)..eval(columns(10).controlsource).
However columns might be rearranged making that useless. IMHO directly use controlsources as alias.field. If columns(5-10) initially match to field(5-10) of its recordsource :
for ix=5 to 10
if atc(lcSearch, trans(eval(field(ix,lcAlias)) ) > 0
endif
endfor
Cetin