replace still with 1 in 'tab2' for amount <= 0 or (month1<MONTH(DATE()) and year1<=YEAR(DATE()))>hi all,
>USE tab2 >m.no=no >m.month1=month1 >m.year1=year1 >SCAN >IF amount1<=0 > scan > SET FILTER TO no==m.no > replace still WITH 1 > ENDSCAN >endif > > IF month1<MONTH(DATE()) and year1<=YEAR(DATE()) > scan > SET FILTER TO no==m.no > replace still WITH 1 > ENDSCAN > ENDIF >SET FILTER TO >>thanks