You wrote:
But what I'm trying to do is populate a field on the main form with data from the query in the subform.
That seems to indicate that you are taking data from the subform (your "detail" records) and using that data to populate something in the "main" form (your "header" record).
If that's not correct, please provide examples of what you have not (i.e. the data structures, or pics of the form(s)), and what you want to do (again - pics or an excel example).
You'd have to concatenate those values together if you want them to appear as a comma separated value in your main form.
What's the reason for populating data in the record's header, using data in the record detail section? Sounds like your data is properly stored, and you're trying to "flatten" it.