Very clever, Barry. It looked so weird I had to try it.
It was one of those "Why didn't I think of that?" moments.
It even works if you take it down another level to find 3rd place
dmax("[Jan]","Actual_res_export", "[Jan] < " &
DMax("[Jan]","actual_res_export", "[Jan] < " &
DMax("[Jan]","actual_res_export")))
Let's see now, there are 25,846 rows in this table. hmmmmmmmm
Barry Gilbert said:
You can stack a couple of Max or DMax calls. For example, using DMax:
intMyVariable = DMax("MyField","MyTable", "MyField < " &
DMax("MyField","MyTable"))
If you had other criteria, you'd have to add them to both criteria statements.
The concept is the same if you're using Select Max(MyField) From... except
you'd create a subquery.
Barry