The first level of IFs work fine, but none of the inner ones work. I'm new to VBA but not new to programming... why won't these work:
If (rs.Fields("EmployeeStatus") = "Non-Exempt") Then
initPTO = 20
If (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 25) Then
initPTO = initPTO + 15
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 15) Then
initPTO = initPTO + 10
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 5) Then
initPTO = initPTO + 5
End If
ElseIf (rs.Fields("EmployeeStatus") = "Exempt") Then
initPTO = 25
If (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 25) Then
initPTO = initPTO + 10
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 10) Then
initPTO = initPTO + 5
End If
End If
If (rs.Fields("EmployeeStatus") = "Non-Exempt") Then
initPTO = 20
If (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 25) Then
initPTO = initPTO + 15
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 15) Then
initPTO = initPTO + 10
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 5) Then
initPTO = initPTO + 5
End If
ElseIf (rs.Fields("EmployeeStatus") = "Exempt") Then
initPTO = 25
If (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 25) Then
initPTO = initPTO + 10
ElseIf (DateDiff("yyyy", Now, rs.Fields("CorportateHireDate")) >= 10) Then
initPTO = initPTO + 5
End If
End If