Not showing the subform solves the issue of child records that need to be deleted since they would not even get created but it doesn't handle deletion of a main form record. That record can be saved even by clicking on the subform.
For this I would probably use staging (temp) tables; 1 for main form, 1 for subform. If the user interacts with the form as desired (save button) write the record to the main tables and delete the temp records. If not, just delete. This should handle new or editing of existing records. I'd use a "mode" variable or OpenArgs to determine if the forms were opened for new or editing of records and code accordingly. If new, run append sql. If edit, run update sql.
EDIT - in a multi user environment with split db's, the temp tables should be in the front end, otherwise you'd delete other user records when clearing the temp records. Or you''d have to use user criteria to delete the proper record(s). I have used this approach for a special case in the past and it served us well.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.