>Hello again,
>
>I want to skip the anyfield.valid() method when the user is adding a record (row buffering) and clicks the revert button
>
>I know the valid method has to be fired each time i leave a field, but ... may i skip it under this special condition?
>
>By now, I solved it using:
>on key label ESC _screen.activeform.mybuttons.revert.click()
>This way, the user presses ESC key and doesn't click the revert button.
>
>Thanks.
>
>Juan Carlos
If your revert button has it's Cancel property set to .T., it will fille LASTKEY() with 27 when clicked. KNowing this, you can code all of your valid methods to go womething like
IF !LASTKEY() = 27
...validation here
ENDIF
Erik Moore
Clientelligence