You can't have a setfocus() if a valid() is anywhere is the program tree. You get an error Therefore a valid event can't call a form for example which might have a setfocus in it. Or have they fixed this now? We often use a form during validation to provide a user opportunity to choose a valid input.
>The best, and correct, approach is to use VALID for validation, thus the name. RETURN=.F. measn failed validation.
>
>>If I use txt.lostfocus as a validation event, what is the best or most correct approach
>>eg...
>>
mytxt.lostfocus
>>***************
>>if ! passvalidation()
>> this.setfocus()
>> nodefault
>> return .f.
>>endif
>>
>>I'm thinking I don't need nodefault and return .f.