Access 2007: Creating a Calculated Field

Calculated fields are convenient when you want to display a formula result on your query. And, since proper table design dictates that you don’t add calculated fields to a table because they are prime for user input errors, the perfect place for them is in a query and they’re as easy as creating a formula.

To help you with calculated fields, here are a few reminders:

     
  • Start each [removed]or, calculation) with the name of the calculated field followed by a colon (:). For example: “TotalPrice:”.
     
  •  
  • Surround field names with square brackets. For example: [UnitPrice] or [EmployeeName].
     
  •  
  • You can open the Zoom box to see all of your expression at one time by pressing [SHIFT]+[F2].
     

Creating A Calculated Control

     
  1. Open a Query in Design View
     
  2.  
  3. Click in the first empty cell in the Query Properties Grid
     
  4.  
  5. Press [SHIFT]+[F2] to open the Zoom Dialog Box
     
  6.  
  7. Type your expression
     

Figure 44. Query Calculated [removed]Zoom Dialog Box)

    5.       Click OK to close the Zoom Dialog Box

    6.       Right-click the new query expression

    7.       Choose Properties from the Shortcut Menu

 

Figure 45. Query Field Property Sheet

 

    8.       Click the Format cell

    9.       Click the Drop-Down arrow and choose a column format

    10.   Save the Query

    11.   Run the Query and preview the results