CANCEL record from SUB FORM

  • Thread starter Thread starter msdl03919
  • Start date Start date
M

msdl03919

Guest
How do you Cancel the record of the main form once the sub form has taken the focus? The undo command only applies to the sub form because the move to it saves the record in the main form.
My cancel button is in the main form
 
The short answer is you can't because the data has been committed to the table. Why do you want to cancel the save? You may be able to cancel the subform taking the focus by using the BeforeUpdate event of the main form to check the record is valid before committing.
 
SUB form cancel reply

I want to allow the user chance to cancel an ADD to the database with a cancel button. Main form is for receipt of items by pallet the subform is for items on the pallet which are variable in number each time.
 
I think you'll need to delete the current record, you can't undo what's been done because it's been committed. If it's a validation issue, we can handle that but if it's a choice issue, then you need to delete the record and set the relationship to cascade deletes to ensure all children are deleted also.
 

Users who are viewing this thread

Back
Top Bottom