I've been looking at your code and thinking about it. My first thought is that the code is executed from a button click event. But I have never seen the click event have a "1" at the end...
Code:
Private Sub cmdFilter_Click1()
But you say the code works.
So looking at the code this morning, it occured to me you are not setting the filter for the subform, you are setting the filter for the main form.
Code:
With Me!sfmBasicQuery.Form '<= this should refer to the sub form
Me.Filter = strWhere '<= this (Me) refers to the main form
Me.FilterOn = True '<= this (Me) refers to the main form
End With
You might try:
Code:
With Me!sfmBasicQuery.Form
.Filter = strWhere
.FilterOn = True
End With
or
Code:
With Me!sfmBasicQuery.Form
!Filter = strWhere
!FilterOn = True
End With
I don't use subforms like this to remember the correct syntax.