MS Access for the Business Environment: Create a Calculated Field with the Expression Builder - Page 3

June 5, 2003

We are now prepared to build the expression that will populate our calculated field.

14.         Right-click the top cell in the column on the immediate left of the Select Query dialog.

15.         Select Build from the context menu that appears, as shown in Illustration 8.



Illustration 8: Initializing the Expression Builder

The Expression Builder appears.

16.         Double-click the Tables folder within the left-most pane of the Expression Builder dialog.

17.         Select Order Details in the expanded selection underneath the Tables folder, as shown in Illustration 9.


Illustration 9: Making Selections within the Expression Builder

The fields of the Order Details table appear in the middle pane of the dialog. The elements that appear in this pane can be pasted into an expression.

18.         Click the Unit Price field once to select it, and then click the Paste button in the toolbar immediately above.

The Unit Price field appears in the Expression Box atop the Expression Builder dialog, as shown in Illustration 10.


Illustration 10: The Newly Selected Field in the Expression Box

19.         Click (once) the minus ("-") symbol in the common operators set in the toolbar.

The "-" operator appears in the Expression Box, to the right of the Unit Price field.

20.         Click the left parentheses ("(") symbol in the common operators set in the toolbar.

21.         Ensuring that Unit Price is highlighted, click the Paste button again to add a second Unit Price--this time to the right of the "(" symbol, to the Expression Box).

22.         Click the multiplication operator ("*") button in the toolbar to add a "*" symbol to the expression.

23.         Highlight the Discount field in the middle pane.

24.         Click the Paste button once again to add the Discount field to the expression.

25.         Conclude by clicking the right parentheses (")") symbol to end the expression with a right parentheses.








The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers