Your definition of "First" and Access' definition probably don't match. If
you are working with a Date/Time field, consider using Maximum and Minimum
(depends on how you sort).
I don't have a clear picture of the underlying data you are using, and
queries start with data!
Have you looked into using the Totals query, grouping by your ethnicity
fields and using the Max (or Min) of the [some kind of date field]?
By the way, if you have named the field holding your date "Date", you will
only confuse yourself AND Access -- this is a reserved word in Access.
Regards
Jeff Boyce
Microsoft Office/Access MVP
I work for the Dept of Corrections where race is a classifying factor. I
guess my post should really not be titled SENIORITY, I was just trying to be
politically correct.
Basically my program is as follows:
We have inmates that we train to be firefighters, we have to keep our
training centers racially balanced and therefore only send out certain
quantities of inmates of certain races at a given time to each of our
training locations. However, we like to send them out on a first come first
serve basis therefore I would need to know who has been waiting the longest
by using their arrival date (thats where I came up with the seniority thing).
Some suggeted that I use the MIN/MAX feature but it was returning all my
table entries and just sorting them by date, what i need it to do is return
the earliest mexican, earliest black, earlies, white, and earliest other
inmate on the waiting list.
So the data in my query consists of name, date, race, location, etc. Its
almost like a staff roster, they are considered employee's
Thanks for all of your assistance.
Carla
aka
cornuts
> Your definition of "First" and Access' definition probably don't match. If
> you are working with a Date/Time field, consider using Maximum and Minimum
[quoted text clipped - 36 lines]
> > "mex"
> > or "oth")
KARL DEWEY - 27 Feb 2007 01:35 GMT
First create a query to find the oldest date for each race --
SELECT Inmates.race, Min(Inmates.date) AS MinOfdate
FROM Inmates
GROUP BY Inmates.race;
Then another query to pull records matching the date for the race --
SELECT Inmates.*
FROM Inmates INNER JOIN cornuts_1 ON (Inmates.race = cornuts_1.race) AND
(Inmates.date = cornuts_1.MinOfdate);
NOTE - You should not use field named DATE as that is a reserved word in
Access.

Signature
KARL DEWEY
Build a little - Test a little
> I work for the Dept of Corrections where race is a classifying factor. I
> guess my post should really not be titled SENIORITY, I was just trying to be
[quoted text clipped - 61 lines]
> > > "mex"
> > > or "oth")