Hi guys,
I have a form containing two subforms, both with a childfield related to a filtered masterfiield.
I filter by choosing a value in a cbo, and setting the filter to this field.
when running the subforms outside this main form they work just fine, but in the main form they remain empty. Why is that?
I wil now provide you with the used code:
-------filter in main form ------------------------------
Me.FilterOn = False
Dim strFilter As String
Dim tmp As String
'###### sets the filter String to the choosen organization, "europe" ##
Me.cboOrgSelect.SetFocus
strFilter = Me.cboOrgSelect.Column(0)
'###### sets formfilter to the choosen Organization ######'
Me.Filter = "Organization = '" & strFilter & "'"
Me.FilterOn = True
------- requerying subforms ---------------------------
Me.subform1.Requery
Me.subform2.Requery
I understand that I might need to update/requery the actual source objects of thes subforms, but how is that done, and is it the answer to my worries?
thank yuo for your time, Insomnia
I have a form containing two subforms, both with a childfield related to a filtered masterfiield.
I filter by choosing a value in a cbo, and setting the filter to this field.
when running the subforms outside this main form they work just fine, but in the main form they remain empty. Why is that?
I wil now provide you with the used code:
-------filter in main form ------------------------------
Me.FilterOn = False
Dim strFilter As String
Dim tmp As String
'###### sets the filter String to the choosen organization, "europe" ##
Me.cboOrgSelect.SetFocus
strFilter = Me.cboOrgSelect.Column(0)
'###### sets formfilter to the choosen Organization ######'
Me.Filter = "Organization = '" & strFilter & "'"
Me.FilterOn = True
------- requerying subforms ---------------------------
Me.subform1.Requery
Me.subform2.Requery
I understand that I might need to update/requery the actual source objects of thes subforms, but how is that done, and is it the answer to my worries?
thank yuo for your time, Insomnia
Last edited: