Hello Forum,
I would like to change the text color in a field depending on the value in the field called Results. The code I have entered is as below.
Private Sub Report_Load()
If [Results] = "POSITIVE" Then
[Results].ForeColor = RGB(255, 0, 0)
Else
[Results].ForeColor = RGB(0, 0, 255)
End If
End Sub
When I enter similar code for fields with number as the data type, it works well. However for fields with text as the data types, all the results take the color specified in the 'Else' part.
Are Text data types supposed to be handled differently and how do i do this?
Thank you,
DrDoIT
I would like to change the text color in a field depending on the value in the field called Results. The code I have entered is as below.
Private Sub Report_Load()
If [Results] = "POSITIVE" Then
[Results].ForeColor = RGB(255, 0, 0)
Else
[Results].ForeColor = RGB(0, 0, 255)
End If
End Sub
When I enter similar code for fields with number as the data type, it works well. However for fields with text as the data types, all the results take the color specified in the 'Else' part.
Are Text data types supposed to be handled differently and how do i do this?
Thank you,
DrDoIT