Dear Vixens and Reynards:
The scenario: you have a form with a grid on it. The user
closes the form. There is a validation error, and in that case, you
want the form to not close.
My solution was to add a property to the form called
.griderror. In the controls that I use in the grid, the validation
starts by setting .griderror to .f. and then does the validation. If
there is an error, it sets .griderror to .t.. The form's
.queryunload checks if .griderror is .t.. If it is, then the form
close is cancelled (or the exit is confirmed, etc.).
This works in my limited testing. I does seem somewhat of a
kludge. Is this a good way to handle it, or is there something
better that I have overlooked?
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.