Is a Query the right answer?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is my dilemma, I need to check 2 date fields, if the second is empty I
need to check if the first date field is more then 180 days from the current
date. If it is more then 180 days, then those records go to a report.
 
So if fieldA is Null (empty) and FieldB is more than 180 days from the current date.

WHERE FieldA is Null AND FieldB < Date() -180

In the grid:
Field: FieldA
Criteria (line 1): Is Null

Field: FieldB
Criteria (line 1): <Date() - 180

I'm guessing that "..more then 180 days from the current date..." means you want
records where the date is 181 days or more in the past and not 181 or more days
in the future.
 
Monty said:
Here is my dilemma, I need to check 2 date fields, if the second is empty I
need to check if the first date field is more then 180 days from the current
date. If it is more then 180 days, then those records go to a report.


Yes, you need to create a query that returns the desired
records and then use that as the report's RecordSource.

Add your table to the query, then drag each field from the
table's field list down to the query's field list.

Under field2 set the criteria to:
Is Null

Under field1 the criteria would be something like:
<DateAdd("d", -180, Date())
 
Mr. Spencer,

You are correct, 181 days or greater from a previous date. Basically,
searching for delinquency.

Monty
 
Mr. Barton,

Thank you for your reply.

Marshall Barton said:
Yes, you need to create a query that returns the desired
records and then use that as the report's RecordSource.

Add your table to the query, then drag each field from the
table's field list down to the query's field list.

Under field2 set the criteria to:
Is Null

Under field1 the criteria would be something like:
<DateAdd("d", -180, Date())
 
Back
Top