Rollback changes made to "1 to Many" records being edited in a mainform / subform combination.

  • Thread starter Thread starter msnews.microsoft.com
  • Start date Start date
M

msnews.microsoft.com

BlankBlankHi,

I have a problem in Main / Subform.

===============================================================
Scenario:

User is creating or editing Orders in the Orders form provided in example
Access 2.0
Northwind Traders database (NWIND.MDB). User edits order information in the
main .
form and edits/adds/deletes multiple line items in the subform, then decides
to abort
the editing. Microsoft Access has already committed the main form
record to the
Orders table as well as the multiple line item edits. Undo from the Edit
menu is not
available.
==============================================================


Now I want to Undo this Add/Edit/Delete in Subform if user press Cancel or
Undo button
in Main form. Microsoft has already provide a solution for MS Access 2000 or
later by
creating a temporary form but I need some other solution.Any possiblity.

Thanks.

Syed
 
On Wed, 21 Jan 2004 00:56:02 +0500, "msnews.microsoft.com"

Posting your message three times in quick succession will not get you
a quicker or a better answer - in fact it will make some of the
volunteers skip your message, since it looks like it's been answered
already.
Now I want to Undo this Add/Edit/Delete in Subform if user press Cancel or
Undo button
in Main form. Microsoft has already provide a solution for MS Access 2000 or
later by
creating a temporary form but I need some other solution.Any possiblity.

You can run a Delete query in the Click event of the button to delete
the records from the table. You cannot Undo; the Undo operation
applies only to records which have not been written to disk, and as
you correctly note, these already have been written. Edits and
deletions *cannot be undone at all* unless you record the values in a
separate table prior to the user editing anything; Access doesn't keep
a record of the prior values.

The Microsoft proposal of a temporary table, committed by some user
action, is about the best way to do this. I'm not sure why you insist
that you need some other solution, since a) it will work and b) it's
much easier to implement than any of the other scenarios I can
imagine.
 
Back
Top