Page 140 - AIS access_chang_ingraham
P. 140

138      CHAPTER 6  HUMAN RESOURCE BUSINESS PROCESS




                               • Employee No 1010
                                  88 hours Regular Time
                                 0.1 hours Overtime
                               • Employee No 1011
                                  88 hours Regular Time
                                 ohours Overtime
                               • .Employee No 1012
                                  88 hours Regular Time
                                 0.4 hours Overtime



                      The Gross Pay Query

                      Since the database has now been populated with employee, payroll, and hours worked data,
                      we can now calculate the payroll. Arriving at net pay is a complex, multistep process and
                      requires the use of queries. We begin with the calculation of gross pay. The calculation for
                      salaried employees and hourly employees is slightly different. Therefore, we need to perform
                      two different queries for gross pay and then merge the two queries together. To do this, we
                      need to be sure that the two queries have matching fields and the same number of columns.
                            1. Click on the Queries object and double-click on Create query in Design view.

                            2. Click on the Employee Table, hold the Ctrl key down, and click on the Hours
                      Worked Table. Click Add and then click Close.
                           3. Drag the EmployeeNo field from the Hours Worked Table into the first column
                      of the design grid. Drag the PPEnded, RegularTimeHours, and OvertimeHours from
                      the Hours Worked Table into the next columns of the design grid. Drag HPayRate from
                      the Employee Table to the next column.

                            4. Click on the Field property in the sixth column of the design grid and click on the
                      Build ::~ icon in the menu'bar. Type HRegularPay: [HPayRatel*[RegularTimeHoursl
                      in the upper portion of the Expression Builder window. Click OK.



                       Expression BtriLder                           L?I~

                        HRegularPay: [HPayRatej"'[RegularTimeHours]  I  OK  I
                                                                           I
                                                                     Cancel
                                                                  J   Undo  I
                        + - l'"l.~J = > < <>1 AndOr Not LikeIJJJ  Paste  I  Help  1

                        •B~ross Pay Hourly QUE ;0., IEm'illoveeNo  "<Value>
                        I±:J Tables         PPEnded
                                            HPayRate
                        I±:J Queries
                                            RegularTimeHours
                        I±:J Forms          o ertimeHours
                                         =
                        I±:J Reports        HRegularPay
                        (iJ Functions       HOvertimePay
                                            Salary
                        D Constants
                                        '--  Grossf'ay
                        D Operators
                        CJ Common ExpresslonB
                                                                           ...Il
                      FIGURE 6-21
   135   136   137   138   139   140   141   142   143   144   145