Do you have any code in form's Paint or Activate/Deactivate events that could be responsible for that bechavior? When you call form Test Deactivate fires and when you come back - Paint and Activate.
>Dear all,
>
>I use a form with a couple of textboxes. In the valid event there is the folowing code:
>
>TEST()
>RETURN(.T.)
>
>In test function there is the folowing code:
>
>FUNCTION TEST()
>DO FORMS TEST
>RETURN(.T.)
>
>The FORM is an EMPTY form with:
>
>ShowWindow = 1
>WindowType = 1
>
>When I release the form the focus does not go to the next textbox but to the first textbox !
>
>When I remove the 'DO FORMS' line everyting works fine. How do I call a form from within a valid() and return the focus properly to the next textbox ?
--sb--