View Full Version : Query using "Last" doesn't always work, need help on alternative way.


watsir2
01-15-2009, 04:02 PM
Hi,

Date sample
Name Date
John 1/2/2009
John 12/1/2008
Mike 1/12/2009
Mike 11/12/2008
Mike 10/2/2007
Jess 1/2/2009
Jess 1/12/2009

When using "Last" in the query, the result:
John 1/2/2009
Mike 11/12/2008 ----> should be 1/12/2009
Jess 1/12/2009

Is there another way writing an expression in the query than "Last"?

Thanks,
Jess

pbaldy
01-15-2009, 04:06 PM
This help?

http://support.microsoft.com/kb/208190

watsir2
01-15-2009, 05:37 PM
Yes, thanks very much!

pbaldy
01-15-2009, 05:54 PM
No problem, and welcome to the site by the way!

Pat Hartman
01-16-2009, 11:16 AM
The article that Paul pointed to gives you a good explaination of what First() and last() actually return. The Max(), Min(), DMax(), and DMin() functions are more likely to give you the results you are looking for.