Hi Klas,
I always thought that the lostfocus fires _after_ the valid event, but I haven't checked it.
As far as the difference between tabbing and clicking is concerned, it seems logical that there is a difference in firing sequence.
Kind regards,
Marc
>>Hi,
>>
>>We have the following happening to us:
>>
>>We have to textbox objects, Text1 and Text2. If the user tabs from Text1 to Text2 the events fires as follow:
>>
>>Text1.LostFocus
>>Text1.Valid
>>Text2.When
>>Text2.GotFocus
>>
>>but if the user selects Text2 with the mouse the firing sequence changes to:
>>
>>Text1.LostFocus
>>Text2.When
>>Text1.Valid
>>Text2.GotFocus
>>
>>
>>Is there some way to make VFP(3) behave the same way when clicking as when using tab ??
>
>The safest bet would be not to spread the code so many places, but a custom property in the form might do the trick
>
In text2.When
>IF !Thisform.text1ValidOK
> IF !text1.valid()
> text1.SetFocus()
> ENDIF
>ENDIF
>
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.