programming4us
 
Office
 

Microsoft Accesss 2010 : Enhancing the Queries That You Build - Creating Calculated Fields

11/16/2014 7:51:52 PM

One of the rules of data normalization is that you shouldn’t include the results of calculations in a database. You can output the results of calculations by building those calculations into queries, and you can display the results of the calculations on forms and reports by making the query the foundation for a form or report. You can also add to forms and reports controls that contain the calculations you want. In certain cases, this can improve performance.

The columns of a query result can hold the result of any valid expression. This makes queries extremely powerful. For example, you could enter the following expression:

Left([First Name],1) & "." & Left([Last Name],1) & "."

This expression would give you the first character of the first name, followed by a period, the first character of the last name, and another period. An even simpler expression would be this one:

[Unit Price]*[Quantity]

This calculation would simply multiply the Unit Price field by the Quantity field. In both cases, Access would automatically name the resulting expression. For example, Figure 1 shows the calculation that results from concatenating the first and last initials. Notice in the figure that Access gives the expression a name (often referred to as an alias). To give the expression a name, such as Initials, you must enter it as follows:

Initials:Left([First Name],1) & "." & Left([Last Name],1) & "."

Figure 1. The result of using the expression Left([First Name],1) & “.” & Left([Last Name],1) & “.” in a query.

The text preceding the colon is the name of the expression—in this case, Initials. If you don’t explicitly give an expression a name, the name defaults to Expr1.

You can enter any valid expression in the Field row of the query design grid. Notice that Access automatically surrounds field names that are included in an expression with square brackets, unless the field name has spaces. If the field name includes any spaces, you must enclose the field name in brackets; otherwise, the query won’t run properly. This is just one of the many reasons field and table names shouldn’t contain spaces.

 
Others
 
- Using OneNote with Other Office 2010 Applications : Entering Outlook Information (Email, Meeting, Contact, Task) on a Page
- Using OneNote with Other Office 2010 Applications : Entering Meeting Details from Outlook in a Note
- Using OneNote with Other Office 2010 Applications : Opening a Page in Word, Creating an Outlook Task in OneNote
- Microsoft Visio 2013 : A Visual Orientation to a Visual Product - Panning and zooming in Visio
- Microsoft Visio 2013 : A Visual Orientation to a Visual Product - Managing the Shapes window
- Microsoft Visio 2013 : A Visual Orientation to a Visual Product - Exploring the drawing window
- Microsoft Excel 2010 : Working with Graphics - Moving an Object, Resizing an Object , Deleting an Object
- Microsoft Excel 2010 : Working with Graphics - Selecting an Object, Formatting an Object
- Microsoft Powerpoint 2010 : Extending PowerPoint with Third-Party Software - Getting Creative with Third-Party Templates, Backgrounds, and Clip Art
- Microsoft Powerpoint 2010 : Extending PowerPoint with Third-Party Software - Camtasia Studio, Articulate Rapid E-Learning Studio, Adobe Presenter
 
 
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