Access97 - Close Form?
Posted on 2001-06-21
I have a form, in an Access97 database, for which I have assigned an "OnUnload" event handler. What it does is simply test for a condition, and if that condition is true then the form will go ahead and close. Else, the Unload event is cancelled, and the form remains open.
This works fine... except for one thing. When the condition isn't met, and the form remains open, I get a message telling me that "The Close Action Was Cancelled" (and then further information in the same dialogue box).
I don't want this message displayed. How do I stop it from appearing?
I had already used the DoCmd.SetWarnings method, but this doesn't seem to prevent it. Besides, I need to set the SetWarnings to true in the very last line anyway.
Can anyone help please?