>Cannot call setfocus from within a valid of a textbox
>
> How can I do ?
Move whaqtever code you have in the Valid and put it in the LostFocus. If you don't want the user to leave the control, issue a NODEFAULT in the LostFocus. It will behave the same as if you return .F. within the Valid and you can use SetFocus if you want.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao