I believe .when() executes when .valid() returns .T. or >0
Needs some testing though.
>In validation for a field on a form I want to be able to execute the code attached to a button on the form. In certain instances, this code needs to be able to set focus to another control. You can't set focus to another control from within a valid. Is there a way to add a click event to the event queue. I though raiseevent would solve my problem, but it doesn't add it to the event queue for processing after valid is finished, it processes it immediately just as if I had called button.click(). Is there any way to add an event to execute after valid() finishes?
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/Never explain, never complain (Queen Elizabeth II)