criteria in query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field for the age of records. It's calculation is Age:date()-[rcvd], it calculates age from date rcvd. I entered the criteria...
between 30 and 100 and it worked fine returning all records over 30 days old. Then I entered ...between [Enter number] and 100 so my users could ask for any number of days old. This returned records without the beginning digits of 1,2 or 3. I tried again with ... >[enter number] and 100.. same problem.
HELP!
 
It sounds like Access / JET got confused with type-casting.

Try using properfunction for Age like:

AgeFromRcvd: DateDiff("d", [rcvd], Date())

which returns a Variant (Long) so there is no confusion.

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
I have a field for the age of records. It's calculation
is Age:date()-[rcvd], it calculates age from date rcvd. I
entered the criteria...
between 30 and 100 and it worked fine returning all
records over 30 days old. Then I entered ...between [Enter
number] and 100 so my users could ask for any number of
days old. This returned records without the beginning
digits of 1,2 or 3. I tried again with ... >[enter number]
and 100.. same problem.
 
Back
Top