Understanding Grouping and Sorting

The Group By clause in Access queries provides a quick and easy way to run aggregate calculations, such as totals, on groups of like values. The DSUM function in Excel is the counterpart to a Sum calculated with the Group By clause in an Access query. However, this function is cumbersome when compared to ease of running its counterpart in Access. You could sort and subtotal in Excel, but again, the Access method is more streamlined.

In Table 4.3, notice that there are two losses for both Florida and Colorado. Because the AccidentState field has the like values and the Incurred field has the values you want to add for a total, place the Group By clause in the AccidentState field and the Sum aggregate calculation ...

Get Access 2002 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.