Or move the code from OnExit to the OnEnter event of the following control.
What advantage has OnEnter got over OnExit? Does it fire after OnClick? I don't think so.
Ofc must have sanity checks
Quite same checks as in OnExit, aren't they? Equally possible or impossible to implement at that place in code.
Note that the same code has to be assigned to OnEnter of each control on the form, including the close button. Only in close button it has to check if the button is clicked and conditionally skip the rest of the code.
Still, this check cannot be implemented if OnClick happens after OnEnter, though.
Keep in mind that the check which control receives focus can be done in OnExit too, so OnEnter has no advantage over OnExit. Only drawbacks.
OnExit is just more natural place, that's all (OnEditingDone even more so, but no real difference -- only that it will also fire when enter key gets pressed inside edit box and focus remains).
OnExit is easier to maintain at least, as OnEnter must never be forgotten to be assigned to any control which might be later added to the form.