Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
@GET.....RANGE equivalent in VFP?
Message
From
09/11/1998 15:08:51
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
 
 
To
09/11/1998 15:08:06
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00155862
Message ID:
00155896
Views:
25
Note: I forgot the ENDWITH after ENDCASE. Sorry...

>I think you have to write code in the Valid event of the textbox. You could always create a class to do it for you. Example with dates:
>
>DEFINE CLASS txtValidateDates
> dLowDate={}
> dHighDate={}
>
> FUNC Valid
> LOCAL lValid
> lValid=.T.
> WITH this
> DO CASE
> CASE !EMPTY(.dLowDate) .AND. !EMPTY(.dHighDate)
> IF .value<.dLowDate{} .OR. .value>.dHighDate
> lValid=.F.
> ENDIF
> CASE !EMPTY(.dHighDate)
> IF .value>.dHighDate
> lValid=.F.
> ENDIF
> CASE !EMPTY(.dLowDate)
> IF .value<.dLowDate
> lValid=.F.
> ENDIF
> ENDCASE
> RETURN lValid
> ENDFUNC
>ENDDEFINE
>
>Or something to this effect.
>
>Of course, you'd want to put the class in a VCX so you could then drop in on a form and then put values in dLowDate and dHighDate at design time.
>
>>I need to specify a range for a few fields on a form. Is there an equivalent to the RANGE option of the @GET from the 2.x days in VFP? I found the RangeHigh and RangeLow events but these say they only deal with numerics where the RANGE option dealt with alpha, numerics and dates. Any suggestions?
Eric Shaneson
Cutting Edge Consulting
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform