returning all records - not sure why!

A

Allie

I have a table called RECORDS
Then a query which sums absences by employee badge #
Here:
SELECT Records.BADGE, Sum(Records.DAYS) AS [Sum Of DAYS], Min(Records.DATE)
AS [First Absence DATE]
FROM Records
GROUP BY Records.BADGE;

Then a query I want to use to report on:

SELECT Records.BADGE, Records.NAME, Records.CC, Records.TEXT, Records.DATE
FROM Records
INNER JOIN [Records Query]
ON Records.BADGE = [Records Query].BADGE
WHERE [Records Query].[First Absence DATE])>=7

For some reason, it is returning ALL the records instead of just the records
with more than 7 absences.

Any ideas on what I have done wrong?
 

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