Hi all,
I have 2 combo boxes, one for month and one for userid and I want to use them to filter the subforms. I was able to filter the subforms using a single combo, but I can not figure out how to get 2 of them to work. Here is the code I got the one to work if anyone needs something similar:
Private Sub Combo7_AfterUpdate()
Dim strF As String
If Not IsNull(Me.Combo7) Then
'assumes bound column in combo is the month number
strF = "UCase$(Left$(sku,3)) = """ & Me.Combo7 & """"
End If
Me.Alibrs_Sales.Form.Filter = strF
Me.Alibrs_Sales.Form.FilterOn = True
Me.Amazon_Sales.Form.Filter = strF
Me.Amazon_Sales.Form.FilterOn = True
Me.Sales.Form.Filter = strF
Me.Sales.Form.FilterOn = True
Thanks for any help on how to do this with 2 combo boxes..
I have 2 combo boxes, one for month and one for userid and I want to use them to filter the subforms. I was able to filter the subforms using a single combo, but I can not figure out how to get 2 of them to work. Here is the code I got the one to work if anyone needs something similar:
Private Sub Combo7_AfterUpdate()
Dim strF As String
If Not IsNull(Me.Combo7) Then
'assumes bound column in combo is the month number
strF = "UCase$(Left$(sku,3)) = """ & Me.Combo7 & """"
End If
Me.Alibrs_Sales.Form.Filter = strF
Me.Alibrs_Sales.Form.FilterOn = True
Me.Amazon_Sales.Form.Filter = strF
Me.Amazon_Sales.Form.FilterOn = True
Me.Sales.Form.Filter = strF
Me.Sales.Form.FilterOn = True
Thanks for any help on how to do this with 2 combo boxes..