Hey,
I have a query on a table ('Services') with fields: ID, ItemNumber and Date. There are many services for each item. ID is the keyfield.
I want to pull out the record with the most recent date for each individual ItemNumber. I have done this with what I think is called an 'aggregate' query , using 'Max' on Date and 'Group By' on ItemNumber. The query works, but I also need the ID field to identify the record. As soon as I put it in the query, whichever option I choose it wrecks the query. On 'Where' it doesn't wreck it, but the field isn't included, so when I pass the results of the query to another query, the field isn't there.
How do I include the ID field in the query result's records without altering the query result? I basically need to include it with a 'Don't use this as criteria' option, if you get what I mean.
Any help on this would be very much appreciated.
(I'm using Access 2000)
I have a query on a table ('Services') with fields: ID, ItemNumber and Date. There are many services for each item. ID is the keyfield.
I want to pull out the record with the most recent date for each individual ItemNumber. I have done this with what I think is called an 'aggregate' query , using 'Max' on Date and 'Group By' on ItemNumber. The query works, but I also need the ID field to identify the record. As soon as I put it in the query, whichever option I choose it wrecks the query. On 'Where' it doesn't wreck it, but the field isn't included, so when I pass the results of the query to another query, the field isn't there.
How do I include the ID field in the query result's records without altering the query result? I basically need to include it with a 'Don't use this as criteria' option, if you get what I mean.
Any help on this would be very much appreciated.
(I'm using Access 2000)