For simplicity, two steps.
First create a query to pick off FormulaID and Invoice Date. In Design view, click the Totals button. This'll add a row called Total. Under FormulaID it should say Group By. Under Invoice Date, click on Group By and using the dropdown arrow, change it to MAX. Save the query.
In the second query, use the above query and the tbldata as the source. Manually connect FormulaID to FormulaID and MaxOfInvoiceData to Invoice Date. Put FormulaID, Invoice Date Qty Cost1 and Cost2 in the grid. Run it and there's your answer.
Also, your tblData is designed incorrectly. It violates the first normal form. It should just have:
FormulaID Date Qty Cost
no cost1, cost2, etc. No, no.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.