Close Form Button

  • Thread starter Thread starter www
  • Start date Start date
W

www

What code is needed in the close form button that asks: Do
you want to save form? Currently, if I close the form, it
will save the information that is on the form without
asking if you want to save it. I am using a add record
button to save the form.
 
The code for closing an object is:

DoCmd.Close acForm, "frmFormName" acSaveYes

Object Type, Object Name, Save

The options for Save are acSaveYes, acSaveNo and
acSavePrompt (ask the user if they want to save)

Remember, data changes are live - you don't need to save a
record once it's entered. Saving a table or form only
saves the object's design. It doesn't affect the data.

Hope this helps!

Howard Brody
 
Back
Top