hello again
inside a global module, create a
"Dim ExitOK As Boolean"
when the main form opens set this variable to false
"ExitOK=False"
in the Quit button you have, add this line
"ExitOK=True"
then, in the unload event check
If Not ExitOK Then Cancel=1
because only the quit button sets this variable to true, any other attempt
to
close the form will fail.
Good luck
Erez
if it's important that no form will close (all open forms will stay open),
use this technique on every form seperately (but with a different
variable)
Song said:
I need more guidance.
I want people only quit the application from my main form which as a quit
button. I don't want people to click Access close button while other
forms/reports open.
Do I put unload event on all the forms or just my main form? What's the
'test' should be?
Thanks.
hi
you need to have a form open.
[quoted text clipped - 14 lines]