I've been busy creating a database and I am using combo boxes to filter several lists of data. I used the following code:
Private Sub cbobedrijf_AfterUpdate()
Me.Filter = "Bedrijf_klant = '" & Me.cbobedrijf & "'"
Me.FilterOn = True
End Sub
Which worked perfectly for about four forms and 10 combo boxes in total. When I tried to use this code on my last form I received the following error:
Data type mismatch in criteria expression
I am not able to solve this problem and I do not understand why this error appears, because I copied->pasted the code and changed it into:
Private Sub cbobedrijf_AfterUpdate()
Me.Filter = "bedrijf_project = '"& Me.cbobedrijf & "'"
Me.FilterOn = True
End Sub
The same I did for all the other combo boxes.