>I have several forms that were created by the forms wizard. If I put the code
>
>if empty(this.value)
> *** display a message
> return .F.
>endif
>
>in the valid method for the field it always gets executed even whem I click on the revert button. If I do not include "RETURN .F." it works for the revert button but goes to the next field on the form.
>
>What I am I doing wrong?
>
>TIA for any help.
I suggest not to validate at all, in the individual fields.
Postpone all validation, until the user tries to save the record. This approach is much simpler, and more flexible for the user. For instance, the user can input the fields in any order.
Also, you may have validation that spans more than one field, e.g., "debit > 0 XOR credit > 0". It doesn't make much sense to validate that at the field level.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)