>Similar to the what others had posted.
>
>Create a property to store the last page deactivated (initialize to your start page). In the Deactivate, set the new property to your current page. In the Activate, check if the last page deactivated equals the current page. If it is, do nothing, else do your check for changes.
>
>You can get really fancy with this if you want it to look like it's remaining in the page you're trying to leave by using thisform.LockScreen, but that may not be worth the effort. You'd have to do lots of manipulating the ActivePage in order for it to look "right".
In other words, you're proposing to move this code into Activate event. We have it working already with all of this, but it doesn't look right to me. Why should we use Activate event and go back to the prev. page (if we answer Cancel), if this functionality really belongs to Deactivate?
If it's not broken, fix it until it is.
My Blog