How to undo all record in subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My subform is datasheet, How can I write code to undo all record just edit or
insert new. My data source of subform come from only one table
 
You can't undo records once they are saved. In a datasheet, the record will
be saved once you move off that record.

One method that you can use:
You can use a temporary table as the source for your datasheet.
Write the records to be edited to the temporary table
Update the temporary table (and add records to it)
When you change the main form, write all the records back to the permanent
table (update existing records, add new records, and delete records marked
for deletion) and then clear the temporary table
If you want to cancel the changes, then you only clear the temporary table.
 
Thankyou for your answer.
If I can not undo, Please suggest me about temporary table. My database has
many table (maintenance data of 12 equipments which difference number of
field and type), What should I do between create temporary table for each
table in database or write code to create table in each form, I mean about
speed, resources and effective of database.
 
Back
Top