criteria in query

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!
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top