none
Have Access ask user to save file before Closing Database

    Question

  • Where and how do I setup to use the Form BeforeUpdate event and use the Cancel option before a user closes the Access Database???  Meaning I want Access to ask the user if they want to save any changes to the file they are in when they exit the database...I can't figure out how to set this up and I know it's possible to make the Access do this!!!
    Wednesday, November 03, 2010 2:14 PM

Answers

  • Access automatically saves updates by default. If you update a field in a record and then leave the record (either to go to another record, close the form, exit Access, etc.) the update is automatically done.


    David H
    • Marked as answer by Bruce Song Thursday, November 11, 2010 1:57 AM
    Thursday, November 04, 2010 2:27 AM

All replies

  • Access automatically saves updates by default. If you update a field in a record and then leave the record (either to go to another record, close the form, exit Access, etc.) the update is automatically done.


    David H
    • Marked as answer by Bruce Song Thursday, November 11, 2010 1:57 AM
    Thursday, November 04, 2010 2:27 AM
  • Hello Zoomer959,

                Welcome to MSDN forum, and I am very glad to help with you!

    The Form.BeforeUpdate event occurs before changed data in a control or record is updated. Here are some articles on MSDN for you to reference:

    http://msdn.microsoft.com/en-us/library/bb238523(office.12).aspx

    http://msdn.microsoft.com/en-us/library/bb258170(v=office.12).aspx

    http://msdn.microsoft.com/en-us/library/bb258171(v=office.12).aspx

    I hope these can help you, and feel free to follow up.

    Best Regards,

    Bruce Song


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, November 05, 2010 3:13 AM
  • Hi Zommer959,

    Have you resolved your issue yet?

    Where and how do I setup to use the Form BeforeUpdate event and use the Cancel option before a user closes the Access Database???

    I think that The Form BeforeUpdate event is not for closing the Access Database , you can refer to my previous reply about the use of Form BeforeUpdate event.

    Meaning I want Access to ask the user if they want to save any changes to the file they are in when they exit the database...I can't figure out how to set this up and I know it's possible to make the Access do this!!!

    I have tested that if you modify a record in table, it will automatically save or update by default when you exit the database just as David said. But, when exit database after modifying Form or Report, it can pop up a message box for you to submit or cancel. So, as for issue, you needn’t to add this function.

    I hope this can help you, and feel free to follow up.

    Best Regards,

    Bruce Song


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, November 10, 2010 4:58 AM