O'Reilly logo

Access 2002 Programming by Example by Bob Villareal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required