query based on a date field

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
1stNotice<(Date()-5) should get it ( using "AND" with the 2ndNotice Is Null
criteria).
 
Back
Top