In order to link a subform with a main form you need a common field between
the two forms. For instance, the main form should have a primary key (unique
value, never repeated) that also appears in the table behind the subform
(can be repeated). Thus if your subform is marks for a particular subject,
then the table which records this info must have the same primary key field
that your main form has, which actually becomes the 'foreign key'. This
links say students to the grades they received.
Once this relationship has been established you can create the relationship
between the two tables involved in the relationship window, a icon on the
menu bar of Access. If you are not familiar with this concept, I would
recommend reading up on the subject before trying to establish this in your
database. Access is the one Office application where learning how to use it
properly has a steeper overall learning curve than any other Office
application. If you ignore crucial subjects to learn such as, Referential
Integrity, Normalization, Relationships, you will create an unusable
database that is hard to maintain.