Microsoft Access Tutorial B - Cengage Learning
Microsoft Access Tutorial B - Cengage Learning Microsoft Access Tutorial B - Cengage Learning
show the SSN, the current wage rate, and the higher rate (which should be titled New Ratein the output). Figure B-10 shows how to set up the query.Figure B-10Query set-up for the calculated fieldThe Salaried field is needed, with the Criteria =No, to select hourly workers. The Showbox for that field is not checked, so the Salaried field values will not show in the query output.Note the expression for the calculated field, which you see in the rightmost field cell:New Rate: 1.1*[Wage Rate]New Rate: merely specifies the desired output heading. (Don’t forget the colon.) The1.1*[Wage Rate] multiplies the old wage rate by 110%, which results in the 10% raise.In the expression, the field name Wage Rate must be enclosed in square brackets. This isa rule: Any time that an Access expression refers to a field name, it must be enclosed insquare brackets.If you run this query, your output should resemble that shown in Figure B-11.Figure B-11Output for a query with calculated fieldNotice that the calculated field output is not shown in Currency format; it’s shown as aDouble—a number with digits after the decimal point. To convert the output to Currency format,click the line above the calculated field expression, thus activating the column (it darkens).Your data-entry screen should resemble the one shown in Figure B-12.18 Tutorial B
Tutorial BFigure B-12Activating a calculated field in query designThen select View—Properties. Click the Format drop-down menu. A window, such asthe one shown in Figure B-13, will pop up.Figure B-13Field Properties of a calculated fieldClick Currency. Then click the upper-right X to close the window. Now when you runthe query, the output should resemble that shown in Figure B-14.Figure B-14Query output with formatted calculated fieldNext, let’s look at how to avoid errors when making calculated fields.Avoiding Errors in Making Calculated FieldsFollow these guidelines to avoid making errors in calculated fields:• Don’t put the expression in the Criteria cell, as if the field definition were a filter. Youare making a field, so put the expression in the Field cell.Microsoft Access Tutorial 19
- Page 1 and 2: Microsoft Access TutorialBTUTORIALM
- Page 4 and 5: Adding Records to a TableAt this po
- Page 8 and 9: • Spell, capitalize, and space a
- Page 10 and 11: Figure B-17 Query set-up for wages
- Page 12 and 13: Figure B-21Choices for statistical
- Page 14 and 15: When you run the query, your output
- Page 16 and 17: Figure B-31Changing the Group By to
- Page 18 and 19: Figure B-35Output of query with dat
- Page 20 and 21: order an item from a Web site, the
- Page 22 and 23: those records not in Delaware (DE).
- Page 24 and 25: 1. Create a query that shows the SS
- Page 26 and 27: FieldTableSortShowCriteriaOr:Figure
- Page 28 and 29: FieldTableUpdate toCriteriaOr:Figur
- Page 30 and 31: Figure B-65Sorting and Summary Opti
- Page 32 and 33: To edit the report in the Design Vi
- Page 34 and 35: You can change the Grand Total in t
- Page 36 and 37: Your goal is to get the Street Addr
- Page 38 and 39: Find and import your spreadsheet. B
- Page 40 and 41: The second step is to make a form b
- Page 42 and 43: Make sure the Toolbox window is sho
- Page 44 and 45: The Switchboard Manager screen will
- Page 46 and 47: TROUBLESHOOTING COMMON PROBLEMSAcce
- Page 48: Access fits the output all on one p
<strong>Tutorial</strong> BFigure B-12Activating a calculated field in query designThen select View—Properties. Click the Format drop-down menu. A window, such asthe one shown in Figure B-13, will pop up.Figure B-13Field Properties of a calculated fieldClick Currency. Then click the upper-right X to close the window. Now when you runthe query, the output should resemble that shown in Figure B-14.Figure B-14Query output with formatted calculated fieldNext, let’s look at how to avoid errors when making calculated fields.Avoiding Errors in Making Calculated FieldsFollow these guidelines to avoid making errors in calculated fields:• Don’t put the expression in the Criteria cell, as if the field definition were a filter. Youare making a field, so put the expression in the Field cell.<strong>Microsoft</strong> <strong>Access</strong> <strong>Tutorial</strong> 19