Hi,

I have a ADO recordset of 1000 records.
I am passing this recordset to a function with parameters as below

Sub GetData(rs as recordset,Filter as String , Flag as Boolean)

If Flag = True then
'Applying filter as it is
rs.Filter = Filter
Else
'Inverting Filter
rs.Filter = " NOT(" + Filter + ")"
End If
End Sub

but in above function. the 'Not' operator is not working. Actually in Else part I want to invert that filter. i.e. if TRUE part returns 800 records then ELSE part should give me remaining 200 records(1000-800) . Anybody knows how to invert that filter without parsing the Filter string (i.e. without changing each = operator to <> in that string).

Thanks.