programming4us
 
Office
 

Microsoft Access 2010 : Enhancing the Queries That You Build - Creating Totals Queries

12/5/2014 3:35:09 AM

To create a Totals query, follow these steps:

1.
Add to the query grid the fields or expressions you want to summarize. It’s important that you add the fields in the order in which you want them grouped. For example, Figure 1 shows a query grouped by country and then by city.

Figure 1. Selecting from a drop-down list the type of calculation for the Total row.

2.
Click Totals in the Show/Hide group on the Design tab of the Ribbon to add a Total row to the query. By default, each field in the query has Group By in the Total row.

3.
Click the Total row on the design grid.

4.
Open the combo box and choose the calculation you want, as shown in Figure 1.

5.
Leave Group By in the Total row for any field you want to group by, as shown in Figure 1. Remember to place the fields in the order in which you want them grouped. For example, if you want the records grouped by country and then by sales representative, you must place the Country field to the left of the Sales Representative field on the query grid. On the other hand, if you want records grouped by sales representative and then by country, you must place the Sales Representative field to the left of the Country field on the query grid.

6.
Add to the query the criteria you want.

Figure 2 shows the design of a query that finds the total, minimum, maximum, and average sales by country and city; Figure 3 shows the results of running the query. As you can see, aggregate functions can give you valuable information.

Figure 2. A query that finds the total, minimum, maximum, and average sales by country and city.

Figure 3. The result of running a query that has many aggregate functions.

If you save this query and reopen it, you should see that Access has made some changes to its design. Access changes the Total cell for Sum to Expression, and it changes the Field cell to the following:

Total: Sum([Unit Price]*[Quantity])

If you look at the Total cell for Avg, you should see that Access changes it to Expression. Access changes the Field cell to the following:

Average: Avg([Unit Price]*[Quantity])

Access modifies the query in this way when it determines that you’re using an aggregate function on an expression that has more than one field. You can enter the expression either way. Access stores and resolves the expression as noted.

 
Others
 
- Microsoft Access 2010 : Enhancing the Queries That You Build - Using Aggregate Functions to Summarize Numeric Data
- Microsoft Project 2010 : Setting Up Project for Your Use - Defining Custom Fields
- Microsoft Project 2010 : Setting Up Project for Your Use - Defining Calendars (part 2) - Setting Project and Resources Calendar
- Microsoft Project 2010 : Setting Up Project for Your Use - Defining Calendars (part 1) - Calendar Hierarchy , Modifying and Defining Base Calendars
- Microsoft Visio 2013 : Creating a New Diagram - Connecting shapes with lines
- Microsoft Visio 2013 : Creating a New Diagram - Resizing and repositioning shapes
- Microsoft PowerPoint 2010 : Working with Charts - Modifying and Formatting Charts (part 3) - Formatting Charts
- Microsoft PowerPoint 2010 : Working with Charts - Modifying and Formatting Charts (part 2) - Modifying Your Chart’s Layout
- Microsoft PowerPoint 2010 : Working with Charts - Modifying and Formatting Charts (part 1) - Modifying Chart Design
- Microsoft PowerPoint 2010 : Working with Charts - Inserting a Chart from Excel
 
 
REVIEW
 
- First look: Apple Watch

- 10 Amazing Tools You Should Be Using with Dropbox

- Sigma 24mm f/1.4 DG HSM Art

- Canon EF11-24mm f/4L USM

- Creative Sound Blaster Roar 2

- Alienware 17 - Dell's Alienware laptops

- Smartwatch : Wellograph

- Xiaomi Redmi 2
 
VIDEO TUTORIAL
 
- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
 
Top 10
 
- How To Install Android Market & Google Apps On Kindle Fire
- How To Make Ubuntu Look Like Windows 7
- How To Add A New Account in MS Outlook 2013
- Get Android & Mac OS X Style Gadgets For Windows 7 & Windows 8 With XWidget
- How To Activate Microsoft Office 2013
- How To Install Actual Facebook App On Kindle Fire
- How To Create, View And Edit Microsoft Office Files On Kindle Fire
- Download Attractive Business PowerPoint Templates For Free At SlideHunter
- How To Use And Enable Hibernate & Sleep Mode In Windows 8
- How To Get Microsoft Office 2013 Trial Product Key From Microsoft