The whole point of a subform is that it is controlled by the record source and the link child and master fields. Let us say the form is Company and the subform is Employees, the record source for the subform might be:
SELECT EmployeeID, CompanyID, Position, Etc FROM Employees
The link child and master fields would be CompanyID. As you moved through the master form, only those records relevant to the current company would be displayed. Let us say you then want to display only those employees who are in a technical position, you can change the record source at run time:
SELECT EmployeeID, CompanyID, Position, Etc FROM Employees
WHERE Position = "Technical"
Or if this is always to be a filter on the form, add a combobox, say, to the main form and use that as a second link master field, so you have:
Link Master Fields: CompanyID; cboPosition
Link Child Fields : CompanyID; Position
Finally, you can simply set the filter property from the main form :
Me.Employees_subform.Form.Filter = "Position=""Tecnical"""
Me.Employees_subform.Form.FilterOn = True
If this is not what you have in mind, please add some notes to your question.
EDIT
You can supply parameters to a query by referencing a control on a form:
SELECT EmployeeID, CompanyID, Position, Etc FROM Employees
WHERE Position = Forms!MyMainForm!cboPosition
You can completely change the SQL of a query and you can use ADO, however, changing the SQL is similar to setting the record source in that the SQL is changed in code and using ADO is usually not the best bet for forms.
What you cannot do is change a parameter and have it 'stick' with a form or subform.
For example:
DoCmd.SetParameter "@SomeID", "1"
' This works
DoCmd.OpenQuery ("Queryx")
' This will give a prompt for @SomeID and then run
Me.SomeSubform.Form.RecordSource = "Queryx"