Hello, I have a query from 2 tables, with a unique id linking them together. this id gets duplicated in the query, how can I retrieve each ID with the latest date with the latest date?
Thank you
RT
Hello, I have a query from 2 tables, with a unique id linking them together. this id gets duplicated in the query, how can I retrieve each ID with the latest date with the latest date?
Thank you
RT
Last edited by ratercero; 05-31-2017 at 12:37 PM.
How can a unique Id be duplicated? Why is any field being duplicated? Or are rows being duplicated. More info please.
Hello Andy,
I have a query, that links 2 tables together from a Form and Subform as shown in the following picture:
I need to show only one line per MR_ID wich has the latest date, this is the table im getting and I neet to remove the higlighted line using the criteria of max date per MR_ID:
Hope I explanied myself better this time.
Thanks
Under your data field (Fecha_de_Cambio), change the "Group By" entry on the Totals row to "Max", and it will return the latest date for each of those groupings.
Remove all fields other than your ID and the date field from your query.
If you want to get the details (other associated fields), then create a new query, joining this two field query back to your original table on BOTH fields, and return all the fields that you want.
Worked like a charm, Thanks JoeM!
You are welcome!