Thanks for the reply and the code sample. I'm going to modify the suggestion somewhat to add 'RANGE' functionality directly in myTextBox class. Kind of backwards that I now have to code in VFP6 what was built in functionality in the 2.x days. Oh well, thanks again.
>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?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.