I have a form and a sub form. I want to prevent saving records in the form if the sub form is empty.
My current solution is the form_close event, I check the RecordsetClone.RecordCount of the subform, if it is equal to zero then I delete the record on the form using a DoCmd.RunSQL command.
It is working most of the time, but I don't know why I am still finding (rarely) some records with empty sub form.
What could be the problem? Is there a better solution?