list by date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that pulls it's info from a query. This query tracks stock
symbols and their 52 week high.
the table will have multiple instances of the same symbol. I only want to
see, on my form, the symbol with the last date
so if APP has an intry on the 9-6-2004 and 9-8-2004 I only want to see the
stats for 9-8-2004.

How would I accoplish that?

thanks
 
I have a form that pulls it's info from a query. This query tracks stock
symbols and their 52 week high.
the table will have multiple instances of the same symbol. I only want to
see, on my form, the symbol with the last date
so if APP has an intry on the 9-6-2004 and 9-8-2004 I only want to see the
stats for 9-8-2004.

How would I accoplish that?

thanks

With a Subquery.

Create a Query based on your table; on the criteria line under the
date field put

=(SELECT Max([datefield]) FROM yourtable AS X WHERE X.Ticker =
yourtable.Ticker)

using your own table and fieldnames, of course.

This will make the query non-updateable; if you need to be able to
update the data in the most recent record (a bit of a shaky idea IMO)
you can use the DMax() function to find the most recent date instead
of the Subquery.

John W. Vinson[MVP]
 
Back
Top