Expression help

  • Thread starter Thread starter STEWARDS
  • Start date Start date
S

STEWARDS

I am building an update query in which I need to populate the date field in
the main form with a date from the sub-form. The field I am pulling from in
the sub-form contains several dates and I need it to pull ONLY the earliest
date. Does anyone know how to build an expression to tell it to grab the
earliest date (or the first in that field since they are in date order?)
I've managed to make it pull a date from that field, but it is pulling the
last date, not the first. My current expression reads [Contributions]![Date].
I'm not that familiar with Access, so any help would be appreciated.
Thanks!
 
Assuming that you have some contributor ID and want to find
the earliest contribution they made, use something like this:

SELECT [Contributions].ContributorID,
Min([Contributions].DateOfTransaction) AS MinOfDateOfTransaction
FROM [Contributions]
GROUP BY [Contributions].ContributorID;

Regards

Kevin
 
Back
Top