Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Posts
    40

    Unanswered: Cancel ALL Updates

    I have a sub form within a form that has multiple records showing at one time. Is there any way to have a cancel button at the bottom of the form allowing the user to cancel any and all changes made to the recordset?? Or can I only "undo" the last update??
    If there is no easy procedure to do this, does anyone have a suggestion on how I can still achieve it? (Hopefully without redoing every single form!!!)
    Thanks in advance!!

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    How do these records in the recordset reflect back to the underlying table? Does making a change to a row and moving off of it update the actual table record?

    How about using a transaction?

  3. #3
    Join Date
    Nov 2003
    Posts
    40
    Yes. If you move off of the line (each line is one record) then it updates. (I currently have integrity checks using the "Before Update" procedure)

    I am not sure how to use a transaction.

  4. #4
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    Two methods I can think of are:
    1. Try using a recordset clone to source your form (I haven't used cloning very often, OLH has an example)
    2. Use a temp table to hold the required data and use that to source your form.

    With either method, you will need to write back to the original source data if someone chooses update or nothing if they choose cancel.
    All code ADO/ADOX unless otherwise specified.
    Mike.

  5. #5
    Join Date
    Nov 2003
    Posts
    40
    I was afraid of that. I couldn't come up with any other way to do it without writing to a separate table first and then "posting" the changes at the very end if they wanted to.
    I am going to have to seriously consider whether or not I want to do that because there is multi forms invloved with 3 or 4 subforms, and it might not end up adding as much value as it will trouble!
    Thanks for your help!!

  6. #6
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326

    Cool

    I usu explain the diff to users between Access and Excel so they know they can't to a multiple undo.

    Use words like "real-time", "system-integrated", and "forward-moving". I have no idea what they mean, and I don't think my users to either, but since they won't admit that, they just agree to whatever else I'm saying.
    All code ADO/ADOX unless otherwise specified.
    Mike.

Posting Permissions

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