Unanswered: Filtering based on recordcount in child subform? Howto?
I have a simple parent-child form built in access. It works flawless.
When scrolling through the parent records, the child subform shows related records. Not all parent records have related records, so in that case the child subform shows nothing. This is perfect, this is how I want it.
Now my question. Can I filter the parent form to only show the parent records that have child records (i.e. the recordcount for the child subform is at least 1 or more)?
Can this be done? Do I need VBA, or can this be done with right-click and then use the filter options.
PS: using access 2003 (forgot to mention that in the original post)
All you would need to do is set the Record Source for the parent form to use an SQL that joins the child records to the parent records with an inner join. Set it back to the "normal" (what you have now) when you want to remove the "filter". You can do this with VBA with Me.RecordSource =SQLStatement