T
True.Kilted.Scot
My form has several data entry controls on it, the first of which is a
date control. There is validation in the txtDateWorked.Exit procedure
which validates the entered date. This is to ensure that the date is
not in the previous week, nor is it more than two weeks in advance of
the current system date.
If an invalid date is entered, a custom message window appears advising
the user that an invalid date has been entered. This give sthem the
option of either entering a valid date, or cancelling the entire record
by using the Undo button, or closing the form. The txtDateWorked.Exit
procedure then performs a txtDateWorked.Undo call, followed by a call
to txtDateWorked.SetFocus.
My problem is, that when I select either the Undo button, or the Close
button, the txtDateWorked.Exit procedure is called again, with the
date--which I know is invalid--being checked again. This results in
the message window appearing, and me being left in a continous loop,
which I cannot get out of.
What am I doing wrong?
Regards
Duncs
date control. There is validation in the txtDateWorked.Exit procedure
which validates the entered date. This is to ensure that the date is
not in the previous week, nor is it more than two weeks in advance of
the current system date.
If an invalid date is entered, a custom message window appears advising
the user that an invalid date has been entered. This give sthem the
option of either entering a valid date, or cancelling the entire record
by using the Undo button, or closing the form. The txtDateWorked.Exit
procedure then performs a txtDateWorked.Undo call, followed by a call
to txtDateWorked.SetFocus.
My problem is, that when I select either the Undo button, or the Close
button, the txtDateWorked.Exit procedure is called again, with the
date--which I know is invalid--being checked again. This results in
the message window appearing, and me being left in a continous loop,
which I cannot get out of.
What am I doing wrong?
Regards
Duncs