Using 'Max' in a query

D

DAngelia

Hello,
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid
 
M

Marshall Barton

DAngelia said:
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid


Hard to tell without seeing the query.

An aggregate function is normally used in a Totals type
(Group By) query. The other fields in the query must be
specified as Group By, which means they will all be the
same. So, how could they be wrong?

Maybe(?) you want to sue a SELECT TOP 1 type query instead
of a Totals query??
 
C

Chris2

DAngelia said:
Hello,
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid

D'Angelia,

You wrote: "When I use 'Max' in a query in a date field. I do not get
the correct records for the fields associated with the date field."

And: "I do however get the correct 'Max' date."

Please forgive me, but I am not sure how that goes together.

"I do not get the correct records" and "I do however get the correct
'Max' date" seem to be opposite statements.


Sincerely,

Chris O.
 
Top