query only if failed to meet requirements

Vargasman

Registered User.
Local time
Today, 08:21
Joined
Sep 26, 2006
Messages
19
I am tyring to set up a query, that runs from a selected date range, to return only the records that don't meet the requirments. For example, I have four fields:

Name
Date
Attended
Required

I want to start the query from a date range usesing Between [StartDate] And [EndDate]. There are mulitpule records containing the same date. Then from there I want to return only the Names that don't attend the required number of sessions.

Ex.
Attended = 2; Required = 4; Return name
Attended = 3; Required = 3; Don't return name

Would this be possible with one query? If so, how would I go about setting up the criteria. If not then how would i link the 2 queries together?
 
This will identify those people that dont attend (replacing Table1 with your table name)

SELECT Table1.Name, Table1.Date, Table1.Required, Table1.Attended
FROM Table1
WHERE (((Table1.Attended)<>[Required]));
 
Be warned that Name, Date and Required are all reserved words in Access. If your fields are really called this, it will cause you problems sooner or later.
 

Users who are viewing this thread

Back
Top Bottom