The message you are getting indicates that the Master/child links are not correctly set. When you set the master/child link, you are telling Access what the PK of the parent form is and what the FK in the child form is so when you create a new record in the child form, Access copies the PK from the parent (which is why Access saves the parent first) and places is in the FK of the child automatically. You could of course, write code to do this yourself but WHY? It is always best to use the features Access provides.
Please open the main form in design view.
Click to select the subform control - not the subform itself.
Paste a picture of the Master/Child properties.
PS, although I agree with Colin that you should be using defined relationships and also enforcing Referential Integrity, that isn't the problem here. Access doesn't care if there is a relationship defined or not. Usually when there is a relationship defined, Access will automatically populate the Master/Child links but I suppose there are some circumstances where the auto population doesn't happen and I have experienced that myself.