SET FILTER TO MONTH(dat)=MONTH(thisform.text2.Value) && via this it works no problem.My lines:
lnMonth=MONTH(thisform.text2.Value)&& not works SET FILTER TO MONTH(dat)=lnMonth && not worksThe change was made to evaluate the MONTH() expression only once, to speed up your program. So if your program works, my changes will only make it work faster.
>if nkeycode=13 > SET FILTER TO > LOCATE FOR dat=thisform.text2.Value > IF FOUND() > * SET FILTER TO MONTH(dat)=MONTH(thisform.text2.Value) && via this it works no problem. > lnMonth=MONTH(thisform.text2.Value)&& not works > SET FILTER TO MONTH(dat)=lnMonth && not works > thisform.grid1.Visible=.t. > thisform.grid1.Refresh > thisform.grid1.column7.setfocus() > else > =messagebox("åÐÇ ÇáÊÇÑíÎ ÛíÑ ãæÌæÏ ") > thisform.grid1.visible=.f. > ENDIF >endif >>
>>if nkeycode=13 >> SET FILTER TO >> >> LOCATE FOR dat=thisform.text2.Value >> IF FOUND() >> lnMonth=MONTH(thisform.text2.Value) >> SET FILTER TO MONTH(dat)=lnMonth >> thisform.grid1.Visible=.t. >> thisform.grid1.Refresh >> thisform.grid1.column7.setfocus() >> else >> =messagebox("åÐÇ ÇáÊÇÑíÎ ÛíÑ ãæÌæÏ ") >> thisform.grid1.visible=.f. >> ENDIF >>endif >>>>
>>>if nkeycode=13 >>>LOCATE FOR dat=thisform.text2.Value >>> >>>IF FOUND() >>> lnMonth=MONTH(thisform.text2.Value) >>> SET FILTER TO MONTH(dat)=lnMonth >>> thisform.grid1.Visible=.t. >>> thisform.grid1.Refresh >>> thisform.grid1.column7.setfocus() >>>else >>> =messagebox("åÐÇ ÇáÊÇÑíÎ ÛíÑ ãæÌæÏ ") >>> thisform.grid1.visible=.f. >>>ENDIF >>>SET FILTER TO >>>endif >>>>>
>>>>IF FOUND() >>>> lnMonth=MONTH(thisform.text2.Value) >>>> SET FILTER TO MONTH(dat)=lnMonth>>>>>hi all,
>>>>>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() >>>>>else >>>>> =messagebox("the date not found ") >>>>> thisform.grid1.visible=.f. >>>>>ENDIF >>>>> SET FILTER TO >>>>>>>>>>thanks