Maxa
06-11-2008, 07:31 PM
Sorry guys,
prematuraly posted the thread (Solved: Recordset Filter) as solved.
Thanks to XLD, the code worked well, but another issue arose.
Actually in the range "a5:a23", I have collection of ids, which I want to extract from the recordset.
Lets say the recorset itself looks like this:
123456
234567
345678
........
987456
and the codes in the range look like:
A B
1 123456
2 345678
3 .......
4 987456
by using the code amended by XLD
rst.Filter = "COUNTERPARTYCODE >= " & "a5" & " and " & "COUNTERPARTYCODE <= " & "a23"
I get all the records between the "A1" value and "A4" value above. when actually I want to exclude IDs which are not in a range.
Any help will be very appreciated.
prematuraly posted the thread (Solved: Recordset Filter) as solved.
Thanks to XLD, the code worked well, but another issue arose.
Actually in the range "a5:a23", I have collection of ids, which I want to extract from the recordset.
Lets say the recorset itself looks like this:
123456
234567
345678
........
987456
and the codes in the range look like:
A B
1 123456
2 345678
3 .......
4 987456
by using the code amended by XLD
rst.Filter = "COUNTERPARTYCODE >= " & "a5" & " and " & "COUNTERPARTYCODE <= " & "a23"
I get all the records between the "A1" value and "A4" value above. when actually I want to exclude IDs which are not in a range.
Any help will be very appreciated.