• Undo Changes Button (A2K SR1)

    • This topic has 4 replies, 4 voices, and was last updated 23 years ago.
    Author
    Topic
    #371243

    I have a form with 30+ bound controls (text boxes, combo boxes, etc.). Right now, when the user presses the Save Record or Main Menu buttons, the record is saved as is, with no chance for the user to Undo the changes he/she has made. When the User presses either of those buttons, I’d like a popup form to appear, asking the user first if he/she would like to Undo or Save the current changes. I’ve created the popup form with Undo, Save, and Cancel buttons. I’m OK with the Save and Cancel buttons. However, I’m not sure how to create the Undo functionality. I know I’d use the OldValue function, but where? How? Do I have to create OldValue code for each of the controls on my form? Or can this be done using an iterative loop?

    Any guidance would be appreciated. Thanks for your help.

    Viewing 1 reply thread
    Author
    Replies
    • #589543

      A form has an Undo method that cancels all changes to the current record, so there is no need to loop through all controls.

    • #589571

      As Hans said, you can use the form’s undo method to undo all the changes.

      More than that, however, I think you will find your users will quickly become annoyed with this popup form. If they have already hit a Save button, they have already told you they want to save the record. Now you ask them again? At least, that’s my experience.

      • #589589

        Thanks, Mark. It was actually one of my users that suggested the Undo feature. I think you’re right, though. I guess we have to assume a modicum of user intelligence! Thanks, again.

        • #589713

          [indent]


          I guess we have to assume a modicum of user intelligence!


          [/indent] Optimist! laugh For every idiot-proof system, there’s a better idiot out there to break it

          If you still want to validate a record before allowing them to move on, you can always use the BeforeUpdate event of the form (assuming it’s a bound form), but they might get justifiably annoyed if they got asked whether they wanted to save *every* single record they added or changed. shrug

    Viewing 1 reply thread
    Reply To: Undo Changes Button (A2K SR1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: