>I am converting a Clipper application to VFP 5.0. As I am rather new to Windows programming I guess this is a rather basic question.
>
>I would like to cancel and exit my form by pressing a Cancel button. However, if i am stuck in a Valid event, i am unable to do so until i enter a valid item in the field concerned. How do i solve this problem ?
>
>Thanks
>
>DESTINE
My dumb solution to this problems was to "blank" the field that is being validated when user inputs an invalid data. This solution would also return .T. if the field is blank in order to temporarily "skip" the validation. If it is a required field, I "revalidate" to make sure data is valid just before saving the data (like in click event of the "Save" button). If "revalidation" fails, I setfocus to that data field and notify user to enter a valid field before saving.
HTH
John
It's "my" world. You're just living in it.