DFirst, DLast Functions Example

This example returns cost information from the Freight field of the first and last record for orders shipped to the United Kingdom.  The domain is an Orders table.  The criteria argument restricts the data by making the expression apply only to records in which Ship Country equals UK.

X = DFirst("[Freight]", "Orders", "[Ship Country] = 'UK'")

Y = DLast("[Freight]", "Orders", "[Ship Country] = 'UK'")