CuriousGeorg
05-22-2014, 05:55 AM
good afternoon,
I'm working on a user form where quality checks are completed in a system and dumps to Access. I am pulling this information from Access into an Excel userform.
(user restrictions as to why this cant be done in access, so we can skirt around this)
the issue im having is I need a caption to change depending on the score above it. But the score is a percentage? Does this matter when coding?
for example
If qcscore.Caption = "" Thenqcrate.Caption = "n/a"
ElseIf qcscore.Caption < 85 And qcscore.Caption > 0 Then
qcrate.Caption = "Below Expectations"
ElseIf qcscore.Caption < 90 And qcscore.Caption > 85 Then
qcrate.Caption = "Good"
ElseIf qcscore.Caption > 90 And qcscore.Caption < 101 Then
qcrate.Caption = "Outstanding"
End If
Problem I'm getting is even if the user has 100% across the board the caption reads "Below Expectations"
if i change this to
If qcscore.Caption = "" Thenqcrate.Caption = "n/a"
End If
If qcscore.Caption > 0 And qcscore.Caption < 80 Then
qcrate.Caption = "Below Expectations"
End If
If qcscore.Caption > 80 And qcscore.Caption < 85 Then
qcrate.Caption = "Good"
End If
If qcscore.Caption > 85 And qcscore.Caption < 101 Then
qcrate.Caption = "Outstanding"
End If
I only get "outstanding".
Can anyone advise what I'm doing wrong please?
I'm working on a user form where quality checks are completed in a system and dumps to Access. I am pulling this information from Access into an Excel userform.
(user restrictions as to why this cant be done in access, so we can skirt around this)
the issue im having is I need a caption to change depending on the score above it. But the score is a percentage? Does this matter when coding?
for example
If qcscore.Caption = "" Thenqcrate.Caption = "n/a"
ElseIf qcscore.Caption < 85 And qcscore.Caption > 0 Then
qcrate.Caption = "Below Expectations"
ElseIf qcscore.Caption < 90 And qcscore.Caption > 85 Then
qcrate.Caption = "Good"
ElseIf qcscore.Caption > 90 And qcscore.Caption < 101 Then
qcrate.Caption = "Outstanding"
End If
Problem I'm getting is even if the user has 100% across the board the caption reads "Below Expectations"
if i change this to
If qcscore.Caption = "" Thenqcrate.Caption = "n/a"
End If
If qcscore.Caption > 0 And qcscore.Caption < 80 Then
qcrate.Caption = "Below Expectations"
End If
If qcscore.Caption > 80 And qcscore.Caption < 85 Then
qcrate.Caption = "Good"
End If
If qcscore.Caption > 85 And qcscore.Caption < 101 Then
qcrate.Caption = "Outstanding"
End If
I only get "outstanding".
Can anyone advise what I'm doing wrong please?