Code:
Set rst = CurrentDb.OpenRecordset("BonZoek")
With rst
'.Filter = "Leveringsbon=" & Bon
varItem = .GetRows()
For intIRow = 1 To .RecordCount
If (varItem(0, intIRow - 1) = Bon) Then strWhere = strWhere & ", " & varItem(1, intIRow - 1)
Next intIRow
End With

How to get rid of this bug?

TIA