>use d:\vfp5test\table3 >select recno() as recno, * from table3 into cursor tmp1 nofilter >select getnewfield(recno,'field1') as f1, getnewfield(recno,'field2') as f2,getnewfield(recno,'field3') as f3 from tmp1 into cursor tmp2 nofilter >brow >return > >function getnewfield >parameter nRecno,cFieldname >select table3 >go nRecno >if isnull(eval(cFieldname)) > do while isnull(eval(cFieldname)) > skip -1 > if bof() > return 0 > endif > enddo >endif >return eval(cFieldname) >return >