This recordset needs to compare with value getting inside For Each
:
Do While Not rs.EOF
Debug.Print Trim(rs!CodeNr)
rs.MoveNext
Loop
Result: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
For Each idx In td.Indexes
If InStr(1, idx.Fields, "+ScanSpe_") = 1 Then
Debug.Print ExtractNumber(idx.Fields)
End If
Next
Result: 1 10 11 12 13 14 15 16 2 3 4 5 6 7 8 9
How can check these two results that I know which one is a match or no match? Any help would be appriciated.