Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Undo Changes Button (A2K SR1)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Undo Changes Button (A2K SR1)

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

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Undo Changes Button (A2K SR1)

    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.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Undo Changes Button (A2K SR1)

    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.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Undo Changes Button (A2K SR1)

    <hr>I guess we have to assume a modicum of user intelligence!<hr>
    Optimist! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> 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. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •