criteria in query

G

Guest

I have a field that calculates in days the age between todays date and the date rcvd. I have tried the following properfunctions Age: Date()-[rcvd] and Age: DateDiff("d", [rcvd], date()). What I'm trying to do is have my users put in their own number of days to return the records that old and older. If I set the criteria myself i.e. >30 (for records 30 days and older) it works fine. But when I set the criteria as follows >[enter number of days old] so that it will prompt the user, it returns records with beginning digits greater than 3 (like a record only 6 days old, because 6 is greater than 3). I've tried everything, can't figure this out. HELP!
 
C

chris

Try ...

clng([enter number of days old])


-----Original Message-----
I have a field that calculates in days the age between
todays date and the date rcvd. I have tried the following
properfunctions Age: Date()-[rcvd] and Age: DateDiff("d",
[rcvd], date()). What I'm trying to do is have my users
put in their own number of days to return the records that
old and older. If I set the criteria myself i.e. >30 (for
records 30 days and older) it works fine. But when I set
the criteria as follows >[enter number of days old] so
that it will prompt the user, it returns records with
beginning digits greater than 3 (like a record only 6 days
old, because 6 is greater than 3). I've tried everything,
can't figure this out. HELP!
 

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