S
Steve
Hi all
This is embarrassing because I know this has to be very simple but
I'm just not getting it so --
I have a single, detail table. One field is (serialnoFK) a foreign
key to a different table. Another field (outdate) is an activity date/
time field.
I just need a query that will give me one record for each SerialNoFK.
This needs to be the last outdate for each SerialNoFK.
I tried to use the aggregate functions but I need the other two fields
(Location, and Name) for each selected record and I can't figure out
how to get those.
So for this recordset --
tblTrack
TrackNo SerialNoFK OUTDATE LOCATION NAME
55 WYW001 12/6/2006 3:59:42 PM DESK Person1
56 WYW001 3/7/2007 11:47:55 AM DESK Person2
62 WYW001 3/7/2007 11:51:17 AM DESK SHELF
51 WYW002 12/6/2006 3:58:30 PM DESK Person1
57 WYW002 3/7/2007 11:48:10 AM DESK Person2
63 WYW002 3/7/2007 11:51:19 AM DESK SHELF
66 WYW003 3/8/2007 11:08:53 AM DESK Person2
67 WYW003 3/8/2007 11:13:16 AM DESK Person3
69 WYW003 3/8/2007 11:14:10 AM DESK Person3
72 WYW003 3/8/2007 1:36:38 PM DESK Person3
I want a query that will return --
TrackNo SerialNoFK OUTDATE LOCATION NAME
62 WYW001 3/7/2007 11:51:17 AM DESK SHELF
63 WYW002 3/7/2007 11:51:19 AM DESK SHELF
72 WYW003 3/8/2007 1:36:38 PM DESK Person3
The most recent record for each serialNoFK
This is embarrassing because I know this has to be very simple but
I'm just not getting it so --
I have a single, detail table. One field is (serialnoFK) a foreign
key to a different table. Another field (outdate) is an activity date/
time field.
I just need a query that will give me one record for each SerialNoFK.
This needs to be the last outdate for each SerialNoFK.
I tried to use the aggregate functions but I need the other two fields
(Location, and Name) for each selected record and I can't figure out
how to get those.
So for this recordset --
tblTrack
TrackNo SerialNoFK OUTDATE LOCATION NAME
55 WYW001 12/6/2006 3:59:42 PM DESK Person1
56 WYW001 3/7/2007 11:47:55 AM DESK Person2
62 WYW001 3/7/2007 11:51:17 AM DESK SHELF
51 WYW002 12/6/2006 3:58:30 PM DESK Person1
57 WYW002 3/7/2007 11:48:10 AM DESK Person2
63 WYW002 3/7/2007 11:51:19 AM DESK SHELF
66 WYW003 3/8/2007 11:08:53 AM DESK Person2
67 WYW003 3/8/2007 11:13:16 AM DESK Person3
69 WYW003 3/8/2007 11:14:10 AM DESK Person3
72 WYW003 3/8/2007 1:36:38 PM DESK Person3
I want a query that will return --
TrackNo SerialNoFK OUTDATE LOCATION NAME
62 WYW001 3/7/2007 11:51:17 AM DESK SHELF
63 WYW002 3/7/2007 11:51:19 AM DESK SHELF
72 WYW003 3/8/2007 1:36:38 PM DESK Person3
The most recent record for each serialNoFK