I have 2 subforms on the main form. Sub_2 displays the details for the item chosen in sub_1, in a list. For both subform, I use the continue form, and they are bounded to 2 querys, with one field in common, say 'id'.
What I have done is adding code in the DClick event on sub_1 to set the sub_2's filter like
Me.Parent.sub_2.Form.Filter = "id=" & "'" & Me.Recordset!id & "'"
Then a requery
Me.Parent.sub_2.Form.Requery
But no luck, when I double click the record in sub_1, no change in sub_2. I have had a look on relevant questions, I think this should work...
Any suggestions? Maybe I should use other approach to do this?
PS: I'm sure Me.Parent.sub_2.Filter
is changed, but requery doesn't work.
EDIT:
Thanks for answers. I find the problem, that is, the 'id' field is in the query, but it's not displayed on the subform, so maybe Access cannot use it.
And when the filter is changed, Access does a requery automatically.