Add NODEFAULT to the VALID when you return anything but .T. to prevent default VFP behavior, which is to move to the next control.
>Hello All,
> I am having a frustrating time controling the behaviour of the cursor when I validate the data from a text box. On my form I am asking the user for input to two textboxes. The results of the two textboxes are combined and that result is validated. If the key is not found, I issue a return -1 hoping that it will move back to the 1st text box. I can't get this to work at all. If I return anything but a .f. or a 0 , the cursor just moves on. If I return .f. or 0 however, the cursor remains in the text box and the user cannot make a valid entry or for that matter do anything else including exiting the form via a command button. I know that many of you have encountered this challenge before. I would be appreciative of suggestions.
>
>Thanks in advance,
>
>Carmen
--sb--