The point is that you cannot require this.
What happens if the user moves to another record in the main form, or
perhaps to the new record? Are you still going to require that they enter a
record in the subform while the main form at a new record before they can
close the main form?
I can understand *why* you want to do that: to avoid parent records that
have no children. But the logic to do that doesn't work.
You could run a query in the Unload event of the main form, to identify any
main-table records that have no chilren. But that could occur because the
child records have been deleted, or they might be records from a previous
session. And what will you do if you find them? If you just prevent the user
from closing the form, you will have users who use Ctrl+Alt+Del to kill
Access, and you will end up with a corrupted database.
So, although your goal is understandable, there is not a simple, quick,
practical solution to this issue.