Gan,
At least in Hacker's Guide, it specifically states that SetFocus can't be called from the Valid or When methods. SetFocus should be called from GotFocus, LostFocus.
To control focus from Valids, you need to use Return 0, Return .F.
PF
>I need to SetFocus back to the textbox after it losses it focus when it's empty. I try setting enable = .F. for all other controls but it's not very good idea for my task. However the SetFocus won't work in Valid, compared to Init.
>
>Thanks in advance.
>
>Gan
(On an infant's shirt): Already smarter than Bush