You are on page 1of 5

Microsoft Access – Tutorial 3

Performing Calculations (start with NortheastComplete)


 copy the HighWageAmounts query and paste it

 name it HighWageAmountsWithBonus and open it in Design

View
 select and drag so that the fields HoursPerWeek,

Experience, StartDate, EndDate and Openings are selected


 delete them by clicking the delete key

 delete the remaining fields except EmployerName,

PositionTitle and Wage


 move these fields into the order above

 select the blank field to the right of Wage

 click the Build button (magic wand) on the Ribbon to open

the Expression Builder


Microsoft Access – Tutorial 3
Performing Calculations
 HighWageswithBonus query should already be selected

 we will add a 2% bonus to the Wage

 double-click Wage in the Expression Categories list

 type the multiply operator (*) and put HoursPerWeek after it

 now multiply that by .02

 click OK to finish the expression

 go to the left of the expression, delete Expr1 and give it the

name WeeklyBonus: (you must include the :)


 click the Show checkbox, if necessary and run the query
Microsoft Access – Tutorial 3
Performing Calculations
 notice that some of the fields have three decimal places

 switch back to Design View

 right-click the WeeklyBonus field and select Properties

 format this field as fixed with 2 decimal places

 give it the Caption Weekly Bonus and run it again


Microsoft Access – Tutorial 3
Aggregate Functions (totals, averages…)
 create a new query in design view
 open the AvailablePositions table and add the Wage field
three times
 click the totals (sum) button on the toolbar
 a new row called Total appears
 click the arrow beside it to see what aggregate functions are
available
 select Min to display the Minimum Wage
 name it by adding MinimumWage: before Wage in the Field
row
 create AverageWage and Maximum Wage statistics using
the remaining fields
 save the Query as WageStatistics
Microsoft Access – Tutorial 3
Record Group Calculations
 we want to get the statistics for each position

 copy and paste the query WageStatistics and name it

WageStatisticsbyPosition and open it in Design View


 add PositionTitle to the fields

 leave the Total row in the default position of Group By

 run the query and you will see statistics for each position

 save and close

You might also like