>That is basically the way I have been doing it. I am told that valid fires before lostfocus,but there are times when valid does not fire, such as when the form is trapping keystokes and takes action in the form keystroke event. Does that mean that lostfocus also does not fire? I am really having trouble getting all the exceptions to the event look set in my mind.
Calvin,
Valid fires before the control loses focus and determines if the focus will be allowed to leave or not, lostfocus fires when the valid says it is ok to leave.
The only situation that I know of that does not fire valid or lostfocus is if the user clicked on a toolbar or menu, since these two items never get focus the focus never leaves the current control.
When and gotfocus are the inverse of valid and lostfocus. When fires as focus comes to a control and before it gets there, it is used to decide whether or not to allow focus to arrive, if when says it is ok then gotfocus fires and is used to prepare for the control having focus.