Hi,
I've spent countless hours trying to work this out and searching this forum so I hope this question hasn't been asked before!
I have a form and a subform with a master/child relationship set based on the primary key of each underlying table. All good there.
Now, I want to use VBA to create a filter based on a set of inputs via combo boxes. But the filter must filter both the Parent and Child records.
Example. "Show me only records where both only the Parent.Field1 = "string" and Child.Field = "string".
I can do this in a QRY as follows:
SELECT Projects.[Project Number], Lessons.[Actions Resolved]
FROM Projects INNER JOIN Lessons ON Projects.ProjectsRecordID = Lessons.ProjectsRecordID
WHERE (((Projects.[Project Number])="AU-2102421") AND ((Lessons.[Actions Resolved])=True));
But, if I make this as a record source for the Parent Form, then the records in the Parent Form are repeated for each individual record in the Child form.
Does anyone have any ideas?
I hope this makes sense!
I've spent countless hours trying to work this out and searching this forum so I hope this question hasn't been asked before!
I have a form and a subform with a master/child relationship set based on the primary key of each underlying table. All good there.
Now, I want to use VBA to create a filter based on a set of inputs via combo boxes. But the filter must filter both the Parent and Child records.
Example. "Show me only records where both only the Parent.Field1 = "string" and Child.Field = "string".
I can do this in a QRY as follows:
SELECT Projects.[Project Number], Lessons.[Actions Resolved]
FROM Projects INNER JOIN Lessons ON Projects.ProjectsRecordID = Lessons.ProjectsRecordID
WHERE (((Projects.[Project Number])="AU-2102421") AND ((Lessons.[Actions Resolved])=True));
But, if I make this as a record source for the Parent Form, then the records in the Parent Form are repeated for each individual record in the Child form.
Does anyone have any ideas?
I hope this makes sense!