If thisform.sex.value=1 and thisform.admtd.value=1 Select student Set Order To CODE Set Filter To code>=thisform.codefm.value and code<=thisform.codeto.value and Year(Date())-Year(dbirth)>=thisform.agefm.value and Year(Date())-Year(dbirth)<=thisform.ageto.value and sec>=thisform.secfm.value and sec<=thisform.secto.value and joind>=thisform.joindfm.value and joind<=thisform.joindto.value and lcode>=thisform.levelfm.value and lcode<=thisform.levelto.value and scode>=thisform.shiftfm.value and scode<=thisform.shiftto.value and sex=1 and admtd=1 .and.ldate>=thisform.ldatefm.value.and.ldate<=thisform.ldateto.value Goto Topnew codes
If thisform.sex.value=1 and thisform.admtd.value=1 SELECT Student.*; FROM ; student; where code>=thisform.codefm.value and code<=thisform.codeto.value and Year(Date())-Year(dbirth)>=thisform.agefm.value and Year(Date())-Year(dbirth)<=thisform.ageto.value and sec>=thisform.secfm.value and sec<=thisform.secto.value and joind>=thisform.joindfm.value and joind<=thisform.joindto.value and lcode>=thisform.levelfm.value and lcode<=thisform.levelto.value and scode>=thisform.shiftfm.value and scode<=thisform.shiftto.value and sex=1 and admtd=1 .and.ldate>=thisform.ldatefm.value.and.ldate<=thisform.ldateto.value; ORDER BY Student.code; INTO CURSOR SYS(2015) endif