finding accounts more than 30 days old

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

In the criteria field of my query I put >=date()-30 to find
records older than 30 days. But for some reason when I go
to the datasheet view it only shows one record when there
are three in the table that are older than 30 days. Any
ideas why this isn't working correctly?
 
-----Original Message-----
In the criteria field of my query I put >=date()-30 to find
records older than 30 days. But for some reason when I go
to the datasheet view it only shows one record when there
are three in the table that are older than 30 days. Any
ideas why this isn't working correctly?
.
I've encountered several quirky things relative to the
way access evaluates formulas in queries. It shouldn't
make any difference, but try enclosing your formula in
paren's >= (date()-30). If that doesn't help, double
check your database and make sure the date your checking
is actually defined as one of the allowable 'Date Types'

Bubar
 
Charles said:
In the criteria field of my query I put >=date()-30 to find
records older than 30 days. But for some reason when I go
to the datasheet view it only shows one record when there
are three in the table that are older than 30 days. Any
ideas why this isn't working correctly?


This is a criterion on a date field? But with ">=date()-30", aren't you
asking for records more *recent* than 30 days ago? I'd think you'd be
using

<= Date()-30

instead.
 
Back
Top