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