Suppress error message on close

ppataki

Registered User.
Local time
Today, 08:54
Joined
Sep 5, 2008
Messages
267
Dear All,

I have a form that has controls that cannot be Null
(these rules are set as Form BeforeUpdate events)

I have a button that has a docmd.close code On Click
The problem is that whenever I click this button with certain controls being null I get the error message that I need to fill in these controls then the form closes

Could you please help on getting rid of these messages?
I would like to close the form without filling in those controls without any error messages (and of course without saving anything)

Many many thanks in advance :)
 
You can, in the click event (before the code which closes the form) put:

Me.Undo
 
Thank you very much, it works perfectly!!
 

Users who are viewing this thread

Back
Top Bottom