Microsoft Access Tutorial B - Cengage Learning
Microsoft Access Tutorial B - Cengage Learning Microsoft Access Tutorial B - Cengage Learning
Figure B-17 Query set-up for wages owed to hourly employees for Week 2In the previous table, the calculated field column was widened so you can see thewhole expression. To widen a column, remember to click the column boundary lineand drag to the right.Run the query. The output should be similar to that shown in Figure B-18 (if you formattedyour calculated field to currency).Figure B-18 Query output for wages owed to hourly employees for Week 2Notice that it was not necessary to pull down the Wage Rate and Hours fields to makethis query work. Return to the Design View. There is no need to save. Select File—Close.Summarizing Data from Multiple Records (Sigma Queries)You may want data that summarizes values from a field for several records (or possibly allrecords) in a table. For example, you might want to know the average hours worked for allemployees in a week, or perhaps the total (sum of) all the hours worked. Furthermore, youmight want data grouped (“stratified”) in some way. For example, you might want to knowthe average hours worked, grouped by all U.S. citizens versus all non-U.S. citizens. Accesscalls this kind of query a “summary” query, or a Sigma query. Unfortunately, this terminologyis not intuitive, but the statistical operations that are allowed will be familiar. These operationsinclude the following:SumCountAverageThe total of some field’s valuesA count of the number of instances in a field, that is, the number of records.Here, to get the number of employees, you’d count the number of SSNnumbers.The average of some field’s values22 Tutorial B
MinVarStDevThe minimum of some field’s valuesThe variance of some field’s valuesThe standard deviation of some field’s valuesAT THE KEYBOARDSuppose that you want to know how many employees are represented in a database. The firststep is to bring the EMPLOYEE table into the QBE screen. Do that now. The query willCount the number of SSNs, which is a Sigma query operation. Thus, you must bring downthe SSN field.To tell Access you want a Sigma query, click the little “Sigma” icon in the menu, asshown in Figure B-19.Tutorial BFigure B-19Sigma iconThis opens up a new row in the lower part of the QBE screen, called the Total row. Atthis point, the screen would resemble that shown in Figure B-20.Figure B-20Sigma query set-upNote that the Total cell contains the words “Group By.” Until you specify a statisticaloperation, Access just assumes that a field will be used for grouping (stratifying) data.To count the number of SSNs, click next to Group By, revealing a little arrow. Click thearrow to reveal a drop-down menu, as shown in Figure B-21.Microsoft Access Tutorial 23
- Page 1 and 2: Microsoft Access TutorialBTUTORIALM
- Page 4 and 5: Adding Records to a TableAt this po
- Page 6 and 7: show the SSN, the current wage rate
- Page 8 and 9: • Spell, capitalize, and space a
- 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
Figure B-17 Query set-up for wages owed to hourly employees for Week 2In the previous table, the calculated field column was widened so you can see thewhole expression. To widen a column, remember to click the column boundary lineand drag to the right.Run the query. The output should be similar to that shown in Figure B-18 (if you formattedyour calculated field to currency).Figure B-18 Query output for wages owed to hourly employees for Week 2Notice that it was not necessary to pull down the Wage Rate and Hours fields to makethis query work. Return to the Design View. There is no need to save. Select File—Close.Summarizing Data from Multiple Records (Sigma Queries)You may want data that summarizes values from a field for several records (or possibly allrecords) in a table. For example, you might want to know the average hours worked for allemployees in a week, or perhaps the total (sum of) all the hours worked. Furthermore, youmight want data grouped (“stratified”) in some way. For example, you might want to knowthe average hours worked, grouped by all U.S. citizens versus all non-U.S. citizens. <strong>Access</strong>calls this kind of query a “summary” query, or a Sigma query. Unfortunately, this terminologyis not intuitive, but the statistical operations that are allowed will be familiar. These operationsinclude the following:SumCountAverageThe total of some field’s valuesA count of the number of instances in a field, that is, the number of records.Here, to get the number of employees, you’d count the number of SSNnumbers.The average of some field’s values22 <strong>Tutorial</strong> B