G
Guest
I have a report that has an unbound text box that changes background color
depending on the results of a calculation.
The textbox takes an average of a number of calculations from another bound
text box.
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
If Pungency < 3.545 Then
Me.Pungency.BackColor = 16711680
ElseIf Pungency < 5.245 Then
Me.Pungency.BackColor = 65280
ElseIf Pungency >= 5.245 Then
Me.Pungency.BackColor = 255
End If
End Sub
On a report that I am trying to calculate the average equals 5.224222222 and
rounded to 5.2
The background color is showing the 255 which is red but it should be 65280
which is green.
I would like to know what am I doing wrong in the Private Sub routine that
is making the background color wrong.
depending on the results of a calculation.
The textbox takes an average of a number of calculations from another bound
text box.
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
If Pungency < 3.545 Then
Me.Pungency.BackColor = 16711680
ElseIf Pungency < 5.245 Then
Me.Pungency.BackColor = 65280
ElseIf Pungency >= 5.245 Then
Me.Pungency.BackColor = 255
End If
End Sub
On a report that I am trying to calculate the average equals 5.224222222 and
rounded to 5.2
The background color is showing the 255 which is red but it should be 65280
which is green.
I would like to know what am I doing wrong in the Private Sub routine that
is making the background color wrong.