Ok all, bear with me. I have created a simple database that holds agent statistics for a daily scorecard. There are 6 different types of employees and each type has a certain criteria to meet.
I.E. - An entry level employee must meet a quota of 8 calls per hour (CPH), If he/she meets it then they "Meet Expectations" if it is below then they "Need Improvement"
I have a report tht lists all employees, their employee type (entry, intermediate, advanced, etc) and their "CPH".
I would like their CPH to be color coded based on meeting criteria or not. It would be easy if they all had to meet the same criteria (I would use conditional formatting)but since there are 6 different types, is there a way to write code for this.
Example in plain words:
IF "employee type=entry level"
Then follow these guidelines to color code values.
I know this may be choppy so let me know what detailed information you would need from me. If you want to really help I wouldn't mind sharing my db by email and having you take a look, it is just a very basic database.
This is the code I have so far, i am very new to VB and am not sure if this is correct. It compiles just fine, and I can open the report after saving this code, but it still does not work. Got any ideas???
Here is what i have so far...let me know what questions youhave or if there is anything you need to help me out. Thanks
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim CCS_HSSType As String
Dim CPH As Integer
If Me.CCS_HSSType.Value = "CCS Entry Level" Then
If Me.CPH.Value > 9 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
ElseIf Me.CCS_HSSType.Value = "CCS Intermediate Level" Then
If Me.CPH.Value > 10 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
ElseIf Me.CCS_HSSType.Value = "CCS Advanced Level" Then
If Me.CPH.Value > 12 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
ElseIf Me.CCS_HSSType.Value = "HSS Entry Level" Then
If Me.CPH.Value > 8 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
ElseIf Me.CCS_HSSType.Value = "HSS Intermediate Level" Then
If Me.CPH.Value > 9 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
ElseIf Me.CCS_HSSType.Value = "HSS Advanced Level" Then
If Me.CPH.Value > 10 Then
Me.CPH.Properties(FillColor) = 38
Else
Me.CPH.Properties(FillColor) = 27
End If
End If
End Sub Please let me know if you can help.
Thanks, Nuschool33