Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope
Message
From
21/04/2001 18:01:10
Ben Dekker
Dekker Soft & Hardware
Axel, Netherlands
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Scope
Miscellaneous
Thread ID:
00497534
Message ID:
00498309
Views:
9
Hi Cy
>
>FUNCTION SCOPE (cDbf,cField,xStart,xEnd)
>LOCAL lcFilterString
>SELECT (cDbf)
>DO CASE
>
>   CASE TYPE("xStart") = "D"
>      lcFilterString = "set filter to between("+cField+",{"+DTOC(xStart)+"},{"+DTOC(xEnd)+"})"
>   CASE TYPE("xStart") = "C"
>      lcFilterString = "set filter to between("+cField+",'"+xStart+"','"+xEnd+"')"
>   CASE TYPE("xStart") = "N" OR TYPE("xStart") = "I"
>      lcFilterString = "set filter to between("+cField+","+xStart+","+xEnd+")"
>ENDCASE
>*-- Set the filter on selected table
>&lcFilterString
>ENDFUNC
>
When I use scope("year","date", {^2001-01-01}, {^2001-30-01})
Your function returns
&lcFiltering = set filter to between(date,{01/01/2001}{30/01/2001)
and returns an error
Greetings

Ben Dekker
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform