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 TOthanks