cSQLStatement = ; [SELECT * FROM okul2 ] + ; [WHERE ] + ; IIF(thisform.Combo1.value = "All", [.T. ], ; IIF(thisform.Combo1.value = "Male", [okul2.sex = "M" ], ; [okul2.sex = "F" ])) + ; IIF(thisform.Combo2.value <> "All", ; [and okul2.ilce=thisform.Combo2.value ], []) + ; IIF(thisform.Combo3.value <> "All", ; [and okul2.okul=thisform.Combo3.value ], []) + ; IIF(thisform.Combo4.value <> "All", ; [and okul2.ozur=thisform.Combo4.value ], []) + ; IIF(thisform.Combo5.value <> "All", ; [and okul2.zeka=thisform.Combo5.value ], []) + ; IIF(thisform.Combo6.value <> "All", ; [and okul2.onlem=thisform.Combo6.value ], []) + ; IIF(thisform.Combo7.value <> "All", ; [and okul2.devam=thisform.Combo7.value ], []) + ; [and okul2.iq>=thisform.Text1.value ] + ; [and okul2.iq<=thisform.Text2.value ] + ; [into cursor crsResult NOFILTER ] &cSQLStatement browse