IT tutorials
 
Office
 

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 4.1.0.56 – Licence Key / Serial Keys
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
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
Facebook
 
Technology FAQ
- IIS Web site works in all browsers except Safari on Mac
- notification
- alternative current in to a pc
- parse url in JavaScript
- Dual WAN on a Fortigate 60
- Should Sys Admins (Domain Admins) also have user accounts?
- DR solution for data warehouse
- C# Creating Plugins
- SCCM 2007 collection by OU not showing all pc's
- Email account got spoofed?
programming4us programming4us