A family of Microsoft relational database management systems designed for ease of use.
It just depends on the query and what you are doing with it. As Karl says, please post the SQL! The reason for the message is just what it says - if the Subform attempts to add a record to the table already in use by the mainform, and doing so would create a duplicate, you'll get the error.
One question: WHY display the same data twice, once on the mainform and again on the subform? If you do need to do so (for screen space issues, or readability), consider using textboxes on the subform with control sources like
=[Parent].[fieldname]
to pull data from the main form and just display it on the subform; these controls will not be editable, but in general you wouldn't want the same data being edited in two places anyhow.