Prev | Current Page 534 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"


To create this calculated field, follow these steps:
1. Create a new query using tblContacts, tblSales, tblSalesLineItems, and
tblProducts.
2. Add FirstName and LastName from tblContacts, and Price and
DiscountPercent from tblSalesLineItems.
3. Click the first empty Field: cell.
4. Type the following DiscountAmt: tblSalesLineItems.Price * tblSalesLineItems
.DiscountPercent and click in another cell.
Your query should look like the one shown in Figure 5-20. The name of the calculated
field is now DiscountAmt. If you didn??™t type the name in Step 4 above, Access automatically
places Expr1: as the name before the calculation. Notice that the DiscountAmt
expression does not completely show in Figure 5-20; however, it should match the
expression entered in Step 4 above.
NOTE
200
Access Building Blocks Part I
FIGURE 5-20
A calculated field, Discount Amount, was created by multiplying two fields from
tblSalesLineItems.
A calculated field has to have a name (supplied either by the user or by Access).


Pages:
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
kolonie dla dzieci Zapalenie języka niemiecki Wrocław sale konferencyjne nad morzem liny