Point taken. Back to VALID.
(sheesh, who do you think I am....John Kerry?) --- L
>What works better about it? :)
>
>I'm going to stick to my story...this belongs in valid() method. If you have any code in when() method of any controls, be prepared for interesting side effects. If user uses the mouse to go to next control, the WHEN() method of the next control fires *before* the lostfocus() method of the current control.
>
>>Thanks....(Slap on Head) This this works better, and was indeed what I was originally thinking... I was playing with putting in a DoDefault(), and it didn't occur to try the NODEFAULT.
>>>Larry,
>>>
>>>Sometimes the valid event will cause an error so I still use the lostfocus event.
>>>
>>>CASE (CTOD(THIS.VALUE) > DATE())
>>> MESSAGEBOX("Error in Date: Greater than current date.",16)
>>> THIS.SetFocus
>>> nodefault
>>>endcase
>>>
>>>
>>>
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.