Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Microsoft Access 2010 : Using Queries to Calculate Values & Creating a Parameter Query

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
5/28/2012 3:36:43 PM

1. Using Queries to Calculate Values

One popular use for database tables is to maintain sales records with fields for the order identifier, the product ordered, and the product’s price. What you can’t do in a table is perform a calculation—the fields are just designed to hold data. In a query, however, you can find totals, averages, or even the minimum or maximum value in the records found by your query.

1.1. Calculate a Value in a Query

  1. Open a query in Design view.

  2. Click Totals to add the Total row to the Query design grid.

  3. Click the Field cell in the column in which you want to calculate the value.

  4. Click Builder.

  5. Build the calculation in the Expression Builder.

  6. Click OK.

  7. In the Field cell with the calculation, edit the value to the left of the colon to reflect the name you want for the field when the query results are displayed as a worksheet.

  8. Click Run.


Note:

To select fields from other tables for use in a calculation, double-click the Tables icon in the left pane of the Expression Builder, double-click the table with the target field, and then double-click the field name in the center pane.


2. Creating a Parameter Query

Some of the time, you can create a query that always looks for the same information, such as orders from a specific country or the total orders from an established customer. Other times, however, you and your colleagues need the flexibility to enter a criterion (such as a country) into the query to focus the results correctly. You can do that by creating a parameter query, which lets you specify the criterion the query uses to find records.

2.1. Build a Parameter Query

  1. Open a query in Design view.

  2. Type the prompt surrounded by square brackets in the Criteria cell in the column representing the field in which you want to find the entered value.

  3. Click Run to test the query.

  4. Type a value in the message box that appears.

  5. Click OK.


Note:


If you don’t type a prompt between the square brackets, the only indication you get to enter a parameter is a blank dialog box. If someone unfamiliar with the database runs the query, he or she will have no idea what to type in the box.

Other -----------------
- Microsoft Access 2010 : Using Criteria to Focus Query Results & Introducing Operators
- Microsoft Excel 2010 : Changing Summary Calculations, Showing and Hiding Data Items, Sorting Your Pivot Table
- Microsoft Excel 2010 : Changing the Pivot Table Layout, Customizing Field Names & Applying Numeric Formats to Data Fields
- Microsoft Word 2010 : Performing Mail Merges - Performing a Basic Mail Merge
- Microsoft Word 2010 : Performing Mail Merges - Performing a Basic Mail Merge
- Windows 7 User Mode Drivers Overview and Operation : Driver Callback Interfaces, UMDF Driver Features
- Windows 7 User Mode Drivers Overview and Operation : Devices Supported in User Mode & UMDF Model Overview
- Microsoft Project 2010 : Setting Up a Project Budget - Reviewing Cost Information
- Microsoft Project 2010 : Setting Up a Project Budget - Preparing for Cost Calculations
- Microsoft Outlook 2010 : Processing Messages Automatically - Creating and Using Quick Steps
 
 
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
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server