The Deactivate event occurs when the form is no longer the active window. It does not occur when a form is unloaded. This event is triggered when a user switches from one window to another. In doing so, the form is no longer the active window, and the form’s Deactivate event triggers.