Results 1 to 3 of 3
  1. #1
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202

    Question Ask before committing changes?

    I'm not sure if this one is even possible due to the nature of how Access works.

    What I have been requested to add is a dialog box that will pop up and ask the user if they are certain that they would like to save the changes they have made to their form before moving away from it.

    I suppose this might have to be done with a "Save" button on the form? If so, what would happen if they tried to navigate away from the record after making changes but hadn't hit the save button, would that data be lost or would there be a way to prompt the user to save before leaving?

    TIA.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    If you use a bound form, Access will always try to save the data when the user moves away, save button or not. You can use the before update event of the form to ask the user. If they answer no, set

    Cancel = True

    and use the Undo method to unwind the changes. If you want complete control, you can use an unbound form, but it's more work to set up.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    10 Gauge's Avatar
    10 Gauge is offline Getting the hang of it...
    Windows 7 64bit Access 2007
    Join Date
    Feb 2011
    Location
    Fredericksburg, VA
    Posts
    202
    Sounds like a lot or re-doing things. They will have to live with the way it is! lol.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums