View Full Version : Only Return Record with latest updates


mark curtis
08-14-2001, 06:27 AM
Dear all,

I have a form with a subform.

The main form holds high level data about a risk, with a unique riskid.

The subform holds all the history of the risk such as when it is reviewed and updated.

Each time it is reviewed a new review date is entered for the new record.

So my problem is I want a query which will only return the history row for the risk where the latest review date is.

Basically how do I return a row for each risk that has the latest date.

I tried Max(DateValue(txtAssessmentDate)) but it did not like that.

Thanks
Mark

Rich
08-14-2001, 07:01 AM
Totals query Group By RiskID Max assDate

mark curtis
11-19-2001, 04:04 AM
Rich,

Thanks for the reply but I also have a field that is in memo format therefore a totals query will not work?

Any ideas

Thanks
Mark

DJN
11-19-2001, 05:58 AM
You can use a memo field in a totals query. This information is from the Microsoft Knowledge base.

To include a Memo or OLE object field in a totals query, drag the field to the QBE grid and select the aggregate (totals) function First() or Last() in the Total row for that field.

David