You should overwrite the key-commit trigger. In this trigger you can first go to block "B" and the check the record is entered valid. For example if B contains a persons name, firstname and birthdate and the name is required, you just check if the name is not null. If this ain't the case the record is empty and no records are entered, if the name is not null then the record is entered and you have at least one record in block B if you have written some validation triggers on the items or a validate_record trigger then you are already sure the record is valid. At this moment you can do a commit_form in the key-commit trigger, otherwise you can give a message.
The only thing you might also need to check is if nobody can delete the record in block B without deleting the record in block A, because then you also have no records in block A.
Kind regards