I have a "Cancel" button on the main form. When this "Cancel" button is pressed, any changes made on both the main form and subform will need to be undo. I am having problem undoing the changes made on the subform. Any idea what is the best way to undo changes made on a subform? Thanks.
I am assuming, that you have this form either directly related to a table or using a query to tie it to a table. If you want to be able to cancel changes you need your form to be unbound. Then you would need two buttons one to save the record, and one to cancel it.
In the save record button you will need an INSERT SQL statement, and on the cancel button you just cancel and nothing is saved.
The reason you can undo in the current situation is because the data you enter is entered straight into the database, and that cant be undone other than deleting (to my knowledge)