how can i exit a record without saving any changes? *access 2003*

Posted on 2006-05-17
Last Modified: 2012-06-27
sofar i have a form bound to a table. when users navigate to a record they may need to make changes. if by accident they make changes and want to disregard them they need a way for the form to ignore any changes made. can someone please help and tell me what i can do to ensure this happens before the changes are writen to the records table?

Question by:RiCHQRD
    LVL 77

    Accepted Solution

    Hi RiCHQRD,
    Different options are available.

    The simplest is to put an Undo button on the form.
    Alternatively, you can add code to the Form Beforeupdate event procedure to display a 'Confirm Changes?' msgbox.

    if msgbox("Confirm you wish to save changes", vbYesNo,"Save Changes") = vbyes then
    ' do nothing
    cancel = true
    end if

    LVL 27

    Expert Comment

    Teach them to hit the Escape Key?

    Author Comment

    thanks peter.

    that will do for now. i had the undo button but i was worried about changes they werent aware of so the code helped. my next task is to have a form open to register the changes in a revision history table, prefrably in another database. lets see how i get on with that.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    Title # Comments Views Activity
    MS Access 2010 - Event To Check Moving Off Record 19 29
    Microsoft Access Table name 3 20
    Order by 8 19
    Open Args 16 19
    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now