Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select
Message
 
To
14/07/2005 01:28:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Select
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01032514
Message ID:
01032515
Views:
19
>hi all,
>could you help me to change this code under to select statment ,
>
>ldStart=MONTH(thisform.text2.Value)
>ldEnd=MONTH(thisform.text25.Value)
>m.a=UPPER(ALLTRIM(thisform.text18.value ))
>m.f=THISFORM.TEXT24.VALUE
>------------------------------
>
>&&&i useto this code to get result for one month only i try to insert another date to get result ,not works&&&
>LOCATE FOR   MONTH(dat)=MONTH(thisform.text2.Value) .and. MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>IF FOUND()
>set filter to   MONTH(dat)=MONTH(thisform.text2.Value) and MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>....
>....
>else
>=messagebox("not found")
>...
>endif
>
>
>thanks.

Try
SELECT * FROM table1;
WHERE MONTH(table1.dat)=MONTH(thisform.text2.Value) and MONTH(table1.dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND table1.TYP=THISFORM.TEXT24.VALUE
INTO CURSOR MyCursor
IF _TALLY > 0
...
...
ELSE
   =messagebox("not found")
ENDIF
But what is this ?
MONTH(dat)=MONTH(thisform.text2.Value)
and
MONTH(dat)=MONTH(thisform.text25.Value)
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform