Counting Dates in a Query

F

Far Out

Hi

I'm new to this.

I'm using Win 2000 and Access 2000. I regularly download data from a records
management database, which includes two fields "Date Due" and "Date Returned
to PAB". These fields will have varying numbers of dates depending upon the
number of records downloaded for a particular period.

What I would like to do is to count the instances of where the date due
occurred before date returned to pab and the instances of where the opposite
is true.

I created a query with two calculated fields "Overdue" and "Not Overdue".
These indicated a "1" to show the figure 1 for situations where the result
was true for either column. I then tried to count the columns using Count
and DCount. However, I cannot get anything to work.

Can someone please help me with this.

FO
 
B

Brian Camire

You might try a query whose SQL looks something like this:

SELECT
[Date Returned to PAB] > [Due Date] AS [Overdue],
Count(*) AS [Instances]
FROM
[Your Table]
GROUP BY
[Date Returned to PAB] > [Due Date]
 

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