Supress Access Save Form Message On Close

  • Thread starter Thread starter Ron Weiner
  • Start date Start date
R

Ron Weiner

I have an access form that I programmatically add controls to when the form
is used. Access remembers that changes have been made to the form and if
the user chooses to close the form with the [X] on the upper right corner,
Access fires off a dialog that ask the user if they want to Save, not Save,
or Cancel.

For now I have "disappeared" the [X] and force the user to close the form by
selecting either the "<Previous" or "Next>" buttons on the form both of
which close the form with the acSaveno Option of the DoCmd.Close command and
take the user to the previous or next step in my wizard. I would really
hate to have to put another button on the form "Cancel" to stop the wizard.
It would be far better to just suppress that dog-gone Access Message.

During experimentation I have discovered that the message fires before the
Forms Unload Event so I can not Trap it there. Anyone have any ideas?

Ron W
 
Duh!

I cant believe I missed that! Thanks :-)

Ron W
Sam said:
Do you need Access warning messages at all for this form?
If not then turn them off just prior to adding your controls or whenever is
most appropriate...

docmd.setwarnings false

make sure to turn them back on in the forms close event.

HTH
Sam


Ron Weiner said:
I have an access form that I programmatically add controls to when the form
is used. Access remembers that changes have been made to the form and if
the user chooses to close the form with the [X] on the upper right corner,
Access fires off a dialog that ask the user if they want to Save, not Save,
or Cancel.

For now I have "disappeared" the [X] and force the user to close the
form
by
selecting either the "<Previous" or "Next>" buttons on the form both of
which close the form with the acSaveno Option of the DoCmd.Close command and
take the user to the previous or next step in my wizard. I would really
hate to have to put another button on the form "Cancel" to stop the wizard.
It would be far better to just suppress that dog-gone Access Message.

During experimentation I have discovered that the message fires before the
Forms Unload Event so I can not Trap it there. Anyone have any ideas?

Ron W
 
Back
Top