C
Christian Davidsson
Hi there everyone!
Need some help on filtering a subform according to some criterias on the
mainform. Let me try and describe the scenario.
mainForm has got two dropdown menus (named: "chain" and "item" and two
grouped radio fields (result saved as "filterBy"). The subForm needs to be
filterd according to "chain" if filterBy = 1 and according to "item" if
filterBy = 2.
The code I've written looks like this (but doesn't work):
----------
Private Sub filterBy_AfterUpdate()
If filtreraBy = 1 Then GoTo Filter_chain
GoTo Filter_item
Filter_chain:
With Me.[subForm].Form
.Filter = "Chain = ""chain_dropdown"""
.FilterOn = True
End With
Filter_artikel:
With Me.[subForm].Form
.Filter = "Item = ""item_dropdown"""
.FilterOn = True
End With
End Sub
----------
I've tried a couple of variations mentioned here earlier, but haven't been
able to make the filter work correctly.
Thanks in advance,
Christian Davidsson
Need some help on filtering a subform according to some criterias on the
mainform. Let me try and describe the scenario.
mainForm has got two dropdown menus (named: "chain" and "item" and two
grouped radio fields (result saved as "filterBy"). The subForm needs to be
filterd according to "chain" if filterBy = 1 and according to "item" if
filterBy = 2.
The code I've written looks like this (but doesn't work):
----------
Private Sub filterBy_AfterUpdate()
If filtreraBy = 1 Then GoTo Filter_chain
GoTo Filter_item
Filter_chain:
With Me.[subForm].Form
.Filter = "Chain = ""chain_dropdown"""
.FilterOn = True
End With
Filter_artikel:
With Me.[subForm].Form
.Filter = "Item = ""item_dropdown"""
.FilterOn = True
End With
End Sub
----------
I've tried a couple of variations mentioned here earlier, but haven't been
able to make the filter work correctly.
Thanks in advance,
Christian Davidsson