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

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 video Game
-   Minecraft Mods - MAD PACK #10 'NETHER DOOM!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #9 'KING SLIME!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #2 'LAVA LOBBERS!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #3 'OBSIDIAN LONGSWORD!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Total War: Warhammer [PC] Demigryph Trailer
-   Minecraft | MINIONS MOVIE MOD! (Despicable Me, Minions Movie)
-   Minecraft | Crazy Craft 3.0 - Ep 3! "TITANS ATTACK"
-   Minecraft | Crazy Craft 3.0 - Ep 2! "THIEVING FROM THE CRAZIES"
-   Minecraft | MORPH HIDE AND SEEK - Minions Despicable Me Mod
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 92 "IS JOE DEAD?!"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 93 "JEDI STRIKE BACK"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 94 "TATOOINE PLANET DESTRUCTION"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 95 "TATOOINE CAPTIVES"
-   Hitman [PS4/XOne/PC] Alpha Gameplay Trailer
-   Satellite Reign [PC] Release Date Trailer
Popular tags
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 windows Phone 7 windows Phone 8
programming4us programming4us
 
Popular keywords
HOW TO Swimlane in Visio Visio sort key Pen and Touch Creating groups in Windows Server Raid in Windows Server Exchange 2010 maintenance Exchange server mail enabled groups Debugging Tools Collaborating
programming4us programming4us
PS4 game trailer XBox One game trailer
WiiU game trailer 3ds game trailer
Trailer game
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer