Hello,
I have a form that uses the responses in each CBO to determine a total score of a file. I am trying to add in some logic for 1 specific CBO (A_Injury_Qualifyer) that says IF A_Injury_Qualifyer = "Yes" then include in the overall score calculation Else ignore the response in A_Injury_Qualifyer and calculate everything else. Basically, I want the reviewer to give credit with a Yes response and not penalized or given credit with a No response.
Here is the code I have that works fine without the added locgic.
Code:
Private Sub btnTotalScore_Click()Dim c As Control, nYes As Long, nNo As Long, nNA As Long
nYes = 0
nNo = 0
nNA = 0
For Each c In Me.Controls
Select Case c.Name
Case "cboStatus", "cboEmployee", "cboManager", "cboQuarter", "A_Coverage_Qualifyer", "A_APD_Qualifyer"
Case Else
If TypeName(c) = "ComboBox" Then
If c.Value = "Yes" Then nYes = nYes + 1
If c.Value = "No" Then nNo = nNo + 1
If c.Value = "N/A" Then nNA = nNA + 1
End If
End Select
Next c
txtTotalScore = Format((nYes) / (nYes + nNo), "Percent")
Thank you in advance for any help or guidance you can provide!