LOCATE FOR dat=thisform.text2.Value IF FOUND() SET FILTER TO MONTH(dat)=MONTH(thisform.text2.Value) thisform.grid1.Visible=.t. thisform.grid1.Refresh thisform.grid1.column7.setfocus() RETURN && <---- here else =messagebox("the date not found ") thisform.grid1.visible=.f. ENDIF SET FILTER TO