Using Validate event instead of LostFocus.
If the value still null, set the Cancel = True to keep the focus
The Validate event has an added advantage.
Let's say you have a Cancel button or something. Generally, the user would not expect to have to enter a value in your field, just so they can exit by hitting Cancel. If you do the check in
LostFocus, it will always complain about the null, even if the user is just trying to exit. But if you do it in
Validate, you can skip it by setting the Cancel button's
CausesValidation property to
False. This simply means "don't bother triggering validation on the control we left, before entering this one".