Re: My ADO Recordset Filter
I believe that the interval argument has to be enclosed in double quotes. Perhaps this might help:
Code:
RS(0).Filter = "DATEDIFF(""dd"", ArchDateDue, CURRENT_TIMESTAMP) <= " & nFilter
Re: My ADO Recordset Filter
I've just done some Googling around and it looks like the Filter poperty does not support calculated values - the Filter is performed locally on the RecordSet rather than by the Database Engine.
It looks as if you're restricted to Filters of the form FileldName-Operator-Value so you may have to re-query with the DateDiff within a WHERE clause. Even concatinating with AND and OR has restrictions as well.
See here: http://docs.sun.com/source/817-2514-10/Ch11_ADO115.html for example
Re: My ADO Recordset Filter
You may also want to look at the .Find and .FindNext methods.
Re: My ADO Recordset Filter
Since the Nz() function doesn't exist in VB6 this must be an Access question.
In any case the Find method only allows searching based on a single column making it somewhat more restrictive than the Filter property.