Thank you for explaining that, I though there mught be a nuance in there.
"Brendan Reynolds" wrote:
> As Roy-Vidar says, the Unload event can be cancelled, the Close event can't.
> So if you want to prevent the form from closing under certain circumstances,
> the Unload event is the place to do that. If, on the other hand, you have
> some code you want to only run if the form has definitely been closed, and
> you do not want that code to run if the closing of the form is cancelled,
> then the Close event might be a better choice. You could do it by using an
> If ... Then ... Else ... End If in the Unload event, and placing the code
> that should run only if the form is definitely going to be closed after the
> 'Else', but dividing the code between the two events is, in my opinion,
> cleaner and more elegant.
>
> --
> Brendan Reynolds
> Access MVP
>
> "DEI" <(E-Mail Removed)> wrote in message
> news:AE6FF8B2-05EF-4C98-BCE8-(E-Mail Removed)...
> > For sure, but it seems that I can use the 'On Unload' event insteadof the
> > 'On
> > Close' event.
> >
> > So, does one supercede the other?
> >
> > "RoyVidar" wrote:
> >
> >> DEI wrote in message
> >> <0F30D2F0-5569-4FBF-BA44-(E-Mail Removed)> :
> >> > What is the difference between the Close event and the Unload event?
> >> >
> >> > Thanks in advance.
> >> >
> >> > DEI
> >>
> >> The most interesting difference from my point of view, is that you can
> >> cancel the closing of the form through the unload event through
> >>
> >> cancel = true
> >>
> >> --
> >> Roy-Vidar
> >>
> >>
> >>
>
>
>
|