Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter
Message
De
19/01/2005 10:11:46
 
 
À
19/01/2005 10:03:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Filter
Versions des environnements
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Divers
Thread ID:
00978510
Message ID:
00978538
Vues:
38
I guess you have typed something wrong, because I only copied and pasted a little bit in your program. Your lines:
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 works
The 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.

>Hi Mr Erick,Mr tore.
>thank you both very much, it works,
>but i get error message lnMonth not found,
>
>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
>
>
>thanks.
>>Hi Mohammed,
>>
>>Try:
>>
>>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
>>
>>
>>The problem was Set Filter To after SET FILTER TO MONTH(dat)=lnMonth.
>>
>>>hi,
>>>just i need to see all records for month 1, at mygrid via mytextbox e.i 01/01/2005,but it get all months , as 01/02/2005....etc
>>>
>>
>>>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
>>
>>>
>>>>And what is not working, it's not clear to me.
>>>>
>>>>By the way, I suggest you create a local variable lnMonth:
>>>>IF FOUND()
>>>>  lnMonth=MONTH(thisform.text2.Value)
>>>>  SET FILTER TO MONTH(dat)=lnMonth
>>>>>hi all,
>>>>>i want to get just what i need to see at my grid exactly via this code under
>>>>>any help ,idea
>>>>>
>>>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform