Hello,
Am trying to change the forcolor of text in a label on a form based on the value from a report.
I have added a text box called (Indicator) on the form that shows the same value from the report mentioned (control source: =[Reports]![rptIndicator]![AccessTotalsRevenue])
The following is the code used
Dim Red=RGB(255,0,0), Orange=RGB(255,153,51), Yellow=RGB(255,255,0), Blue=RGB(0,102,255), Green=RGB(51,204,51)
Select Case Me.Indicator
Case Me.Indicator.Value > 0 <= 40000
Me.Red.ForeColor = Red
Case Me.Indicator.Value > 40000 <= 45000
Me.Red.ForeColor = Orange
Case Me.Indicator.Value > 45000 <= 50000
Me.Red.ForeColor = Yellow
Case Me.Indicator.Value > 50000 <= 55000
Me.Red.ForeColor = Blue
Case Me.Indicator.Value > 55000
Me.Red.ForeColor = Green
End Select
Help is highly appreciated
Am trying to change the forcolor of text in a label on a form based on the value from a report.
I have added a text box called (Indicator) on the form that shows the same value from the report mentioned (control source: =[Reports]![rptIndicator]![AccessTotalsRevenue])
The following is the code used
Dim Red=RGB(255,0,0), Orange=RGB(255,153,51), Yellow=RGB(255,255,0), Blue=RGB(0,102,255), Green=RGB(51,204,51)
Select Case Me.Indicator
Case Me.Indicator.Value > 0 <= 40000
Me.Red.ForeColor = Red
Case Me.Indicator.Value > 40000 <= 45000
Me.Red.ForeColor = Orange
Case Me.Indicator.Value > 45000 <= 50000
Me.Red.ForeColor = Yellow
Case Me.Indicator.Value > 50000 <= 55000
Me.Red.ForeColor = Blue
Case Me.Indicator.Value > 55000
Me.Red.ForeColor = Green
End Select
Help is highly appreciated