Selecting data depending on the latest date

G

Guest

I have a query running off a table that contains data like this:

Status Date Comments
Appl 01/01/05 Application received
Lttr 02/01/05 Letters Sent 02/01/05
Recv 05/01/05 Reply Received - Personal
Recv 06/01/05 Reply Received - Professional
Recv 10/01/05 Reply Received - Other
Acpt 15/01/05 Accepted 15/01/05

I would then like to convert that onto one line using the query, so the
outpout looks like this:

Appl Lttr Recv Comments Acpt
01/01/05 02/01/05 10/01/05 Reply Received - Other 15/01/05

This way, I get the latest Recv date and the comments that relate to this
field. What formula can I use in a query to get this output? I can use the
max to work out the max date to get the latest Recv, but how do I then only
pull out the comments relevant to the latest date?
 
M

[MVP] S.Clark

You have a crosstab, sort of. You can do it, but think about having a table
that is used for this format, and then two or several queries to populate
the table, because you probably won't get it in just one.
 

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

Top