>Hi George:
>
>Thanks for responding.
>
>When I put this code in the valid event, I get the error:
>"cannot call setfocus from with a When, Valid, Rangehigh or rangelow
>event".
Hi Sheena,
You simply need to return .F. from the .Valid to return the focus to the control that called it. You might use something like:
LOCAL llresult
llresult = NOT EMPTY(This.Value)
IF NOT llresult
= MESSAGEBOX("You must enter a Startdate for your Intervention!", 48, "CATS")
ENDIF
RETURN llresult
In the above, if nothing is entered in the text box, the user will get the messagebox. Otherwise, focus moves to the next control in the tab order.
hth,
George
Ubi caritas et amor, deus ibi est