Noor said:
what is the last() function do..
I cant find anything related to it in the access help
Hi Noor,
In addition to what David has well stated,
to find this info in Access 200x Help:
click on the Contents tab
expand "Microsoft Jet SQL Reference"
expand "Overview"
click on "SQL Aggregate Functions"
in the right-hand window
click on "First, Last Functions"
Important to note:
"Because records are usually returned in no particular order
(unless the query includes an ORDER BY clause),
the records returned by these functions will be arbitrary."
When the query is making a group,
Last([somefield]) will be the value for [somefield]
in the last valid record in that group as
it is making that group.
One place where Last comes in handy (as David states)
is where you don't care what values the query returns
from 2 or more fields in your group, but you want to make
sure those arbitrary field values came *from the same record.*
Good luck,
Gary Walter