>I am writing my 1st application in FoxPro and need some help.
>
>I do a seek in the "valid" event of a text box to make sure it exists in a table. If not, I show an error message ("this value does not exist!") and return .f., else I return .t.
>
>I've created command buttons to "Save" and "Cancel".
>
>If the "Cancel" button is clicked, the valid event causes the error message "this value does not exist" to pop up and I cannot get out of the test box until a valid value has been entered.
Set the Cancel button's Cancel property to .T.
Then in the textbox.Valid() check LASTKEY()=27 - if so, then the Cancel was clicked - return .T.
Insanity: Doing the same thing over and over and expecting different results.