Results 1 to 3 of 3
  1. #1
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    41

    How do you exit a bound form without saving any changes made?

    I have created a form through the form wizard and it has all the fields bound to corresponding fields in a database record. Therefore I can change any and all fields in a record.


    I have a SAVE button so I can save any changes I want whenever I want.
    I exit the form with a button called RETURN Pressing that button brings up the macro "close window" the option save is set to no. but it still saves any changes.

    My question is How do I get out of this form with out saving any changes I have made on the data in the form? (the SAVE button has NOT been used)
    Or perhaps the real question is:
    How do I revert to the original data that was in the form before I started making any changes
    (the SAVE button has NOT been used)
    ?

    If possible I would like to know how to do it either way.

    Any help would be appreciated as I'm always making changes and then wishing I could get back to the original data that I can't remember.
    Dave

    PS I hope you can follow what I'm saying because sometimes I'm not very clear.

  2. #2
    John_G is offline VIP
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You can prevent changes from saving by using Me.Undo. You would put it in the code/macro that runs if you don't want to save the changes. I don't use macros, so I can't help you much there (!), but I think you want to use a Yes/No message box.

  3. #3
    IamKJVonly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Aug 2018
    Posts
    41
    John_G
    Thanks it works beautifully.
    The only problem now is that you gave me a good idea about a check box next to my "SAVE" button but since that's an imbedded macro I going to have to change it over to a DoCmd. Thanks for the extra work LOL.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-13-2015, 03:01 PM
  2. Exit forms without saving
    By sk88 in forum Access
    Replies: 19
    Last Post: 12-19-2013, 06:04 PM
  3. Replies: 5
    Last Post: 07-26-2012, 07:53 AM
  4. Exit without saving Subform
    By sk88 in forum Access
    Replies: 5
    Last Post: 05-03-2012, 11:55 AM
  5. Saving bound and unbound fields
    By mejia.j88 in forum Forms
    Replies: 2
    Last Post: 11-04-2011, 05:09 PM

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