By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

Date Criteria in a query

P: n/a
ljn
Hello,

I'm trying to build a query to retrieve all records where a certain
date is older than 120 days. I tried doing > 120 in the critera box
for that date, but it's not working. Any ideas?

Thanks!

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 22 Jun 2005 13:20:23 -0700, ljn wrote:
Hello,

I'm trying to build a query to retrieve all records where a certain
date is older than 120 days. I tried doing > 120 in the critera box
for that date, but it's not working. Any ideas?

Thanks!
You have to fist tell it >120 from what!!

Add a new column to the grid.
Exp:Date() - [DateField]

As criteria for this column, write120

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a

Thanks for the reply. The date I want to query on is a ReceivedDt. I
figured it out by using DateAdd. In the criteria block for that field
in the query I put:

<DateAdd("d", -120, Date())

And that worked. I think I may have been better off using 4 months, but
the exact date isn't critical. Just the fact that the records were 4
months old and a certain action had not been taken.

Again, thanks for the reply.
Lisa
- Way out of practice with Access

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.