Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Modifying Code

Status
Not open for further replies.

Ptrif

Technical User
May 19, 2003
106
0
0
US
I have the following code on a form that i use to monitor and grade phone agents phone calls. The below code averages the scores and if there is a N/A it doesnt count that into the overall average, i need to add something to the code so that each one of the "categories" is a certain percentage of that section, hence weighting each one by multiplying by say 0.25 or 0.10 etc...etc..., would anyone know how i could incorporate that with this current code without having to rewrite the entire database? Hope this made sense.....any help or suggestions are welcome!


Code:
Private Function GetAverageacc() As Single

    Dim intValidCount As Integer
    Dim intScore As Integer
    
    intValidCount = 0
    intScore = 0
    
    If Me![Accuracy] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![Accuracy]
    End If
    If Me![investigation] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![investigation]
    End If
    If Me![basic navigation] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![basic navigation]
    End If
    If Me![followup] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![followup]
    End If
    If Me![demographics] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![demographics]
    End If
    If Me![Authentication] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![Authentication]
    End If
    If Me![work_flow] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![work_flow]
    End If
    If Me![fulfillment] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![fulfillment]
    End If
    If Me![escalation] <> "N/A" Then
        intValidCount = intValidCount + 1
        intScore = intScore + Me![escalation]
        End If
        

   

    If intValidCount = 0 Then
        Me![total1] = 0
    Else
        Me![total1] = intScore / intValidCount
    End If

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top