
Validating/Validated questions
I have a class called cMyIntegerBox. It allows the setting of a minimum
value and a maximum value. I also have a class cICLocnCode which inherits
cMyIntegerBox and in the Sub New() it sets the minimum value to 1.
cMyIntegerBox has a Private Sub to handle mybase.validating which checks to
make sure a number was entered and that it is greater then the minimum
value.
Likewise, cICLocnCode has a Private Sub which verifies the location exists
in the database.
My problem is on a form I use the ESC key to exit the form (cancelbutton is
set). If I am on a field tied to cICLocnCode and hit the ESC key, it does
the validating for cMyIntegerBox and fails because the entered value is
blank, which is less then 1.
My question is I would like (I think) a way that if the ESC key is hit to
NOT do any validating routines. Any ideas how to do this, or is there a
better way to do what I am trying to do.
TIA