thisform.text1.value=05/06/2006 if thisform.text2.value=3 thisform.text3.value=thisform.text1.value-3 months && result as 05/03/2006 DELETE FROM allres WHERE EXISTS(SELECT * FROM allresdintial WHERE clint_no=allres.clint_no and allresdintial.dat>=thisform.text3.value) if thisform.text2.value=6 thisform.text3.value=thisform.text1.value-6 months && result as DELETE FROM allres WHERE EXISTS(SELECT * FROM allresdintial WHERE clint_no=allres.clint_no and allresdintial.dat>=thisform.text3.value) if thisform.text2.value=9 thisform.text3.value=thisform.text1.value-9 months && result as DELETE FROM allres WHERE EXISTS(SELECT * FROM allresdintial WHERE clint_no=allres.clint_no and allresdintial.dat>=thisform.text3.value) if thisform.text2.value=12 thisform.text3.value=thisform.text1.value-12 months && result as DELETE FROM allres WHERE EXISTS(SELECT * FROM allresdintial WHERE clint_no=allres.clint_no and allresdintial.dat>=thisform.text3.value)thanks .