Returning 0 instead of .f. will keep focus on the current control and supress foxpro error message.
>Hi there!!
>
>If in the valid event of textbox i say :
>
> messagebox 'some message'
> retu .f.
>after displaying the messagebox ..foxpro says "Invalid input"
>
>
>and if i don't write retu .f. , focus automatically shifts to the next control.
>
>also setfocus() is not possible in valid event.
>
>
>Please Help.
>
>Regards
>
>Sunny
--sb--