query based on a date field

G

Guest

Hello,

I have a database in which I have two fields; called "1st Notice" amd "2nd
Notice". Both are date fields and are formatted as medium date.

I have a query set up which prints out the customer's first & last name,
phone number, as well as the "1st Notice" field.

What I would like to do, is run this query and have it automatically select
records based on the following:

1) The "2nd Notice" date field is currently Nul (i havent mailed a second
notice)
2) The date already entered into the "1st Notice" field is 5 or more days
previous to today (the system date).

So, for example, I have 2 records. Record A has a "1st Notice" date of
"25-Nov-04" and Record B has a "1st Notice" date of "02-Dec-04". When I run
this query, only Record A's information should show on my query, since its
"1st Notice" date is 5 or more days in the past compared to today, i.e. the
date of the system at the time you run the query.

Now, getting the "2nd Notice" date is Nul is something I mastered thus far
<G>. But I tried messing around with adding expressions in my query to do the
date calculation, but can't seem to get the jest of it. Any help would be
much appreciated.

Thanks!!

Richard
 
G

Guest

1stNotice<(Date()-5) should get it ( using "AND" with the 2ndNotice Is Null
criteria).
 

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

Similar Threads

Show if null or greater than 13
Excel Message box with days of month & date. 1
The query cannot be completed. 1
Date ranges 5
Parameter Query Problem 2
query on date 1
Update query with date criteria 3
Adding data in a 2nd query 5

Top