Sorry. You also have to change the "order by" to use Max(Datex) or its alias instead of just Datex. Doing that would put Datex in the aggregate function the error mentioned.
David wrote:
If I don't include both I get this error
"You tried to execute a query that does not include the specified expression 'Datex' as part of an aggregate function."
Meddie wrote:
It looks as though the "Datex" in the group by clause is the problem. What it's doing is grouping by Type AND Date, which means it'll see QAC Azo-Brader 5/30/2001 as different from QAC Azo-Brader 5/29/2001. Just use "group by Type" and you should be fine.