Easy-squeezy, Tim.
You need to create an aggregate query.
1. Open a new query in design view.
2. You will see an icon for a Totals query. It looks like the Greek letter Sigma. Click it. That will add a Total line to the query grid.
3. Drag the fields you want to the grid. Notice they will all have Group By in the Totals line.
4. Change the date field Group By to Maximum. That will get the latest date for each person and the record that goes with it.
Just so you know...When you ask a new question it is best not to address it to a specific person. Others might overlook it and leave it unanswered for a longer time.
Bill
--- In MS_Access_Professionals@yahoogroups.com, "timdbui" <timdbui@...> wrote:
>
> Hi Bill,
>
> Thanks so much for your last reply! It was very helpful. Can you help me with another query? I have a table that has 4 columns: A:Ticker, B:DateInput, C:Value, D:MemberName.
>
> Say, the members put in different values for XYZ on different dates:
>
> 1/1/2012, XYY, 10, John
> 2/2/2012, XYZ, 12, John
> 5/3/2012, XYZ, 14, John
> 2/3/2012, ABC, 20, Bill
> 5/3/2012, ABC, 22, Bill
>
>
>
> How can I create a query in Access to get the latest value that John put in for XYZ. I want to have only 1 answer for each stock as the result of the query, which are:
>
> 5/3/2012, XYZ, 14, John
> 5/3/2012, ABC, 22, Bill
>
>
> Thanks again for your helps! Tim
>
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar