I have 2 subforms on the main form. Sub_2 displays the details for the item selected in sub_1 in the list. For both subforms, a continuation form is used, and they are limited to two queries, with one common field, for example, "id".
What I did was add the code to the DClick event on sub_1 to set the sub_2 filter, for example
Me.Parent.sub_2.Form.Filter = "id=" & "'" & Me.Recordset!id & "'"
Then request
Me.Parent.sub_2.Form.Requery
But no luck when I double-clicked the entry in sub_1, no change to sub_2. I looked at the relevant questions, I think this should work ...
Any suggestions? Maybe I should use a different approach for this?
PS: I'm sure Me.Parent.sub_2.Filter changed, but requery is not working.
EDIT:
Thanks for answers. I find the problem, that is, the "id" field is in the request, but it does not appear in the subform, so Access may not be able to use it.
And when you change the filter, Access automatically executes the request.
source share