Hi. I'm having problems with filtering a form. What I'm trying to achieve is having two combo boxes, one with number value (Employee ID) and another with text value (Item code). User should be able to filter both simultaneously, so that it would be possible to show records of a certain item taken/added by certain employee. I have a similar thing in another form with two text fields, but now that the data types are different, I'm lost.
Here is a code I'm currently working with, this would be called from both combo boxes' AfterUpdate event. Now I get a type mismatch (error 13).
Any help or pointing to the right direction would be appreciated.
Here is a code I'm currently working with, this would be called from both combo boxes' AfterUpdate event. Now I get a type mismatch (error 13).
Code:
Private Sub actionFilter()
Dim actionFilter As String
If Not IsNull([ItemCombo]) Then
actionFilter = actionFilter & "[ItmBarcode]= """ & Me.ItemCombo.Column(0) & """" And ""
End If
actionFilter = actionFilter & "[ACTION_T].[EmployeeID]=" & Me.EmployeeCombo.Column(0)
Me.Filter = actionFilter
Me.FilterOn = True
End Sub
Any help or pointing to the right direction would be appreciated.