Expression help

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!
 
K

kc-mass

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top