Jonny45wakey
Member
- Local time
- Today, 19:34
- Joined
- May 4, 2020
- Messages
- 48
Hi I have a textbox on a form called OEEMTDMTand it contains a percentage value eg 91.6%
I'd like the texbox backcolour to change to Green if >=92% or red if <92% but both conditional formatting tool and vba conditional formatting not working.
The textbox on the form has its backcolour set to normal not transparent also.
I've used the following vba but in the form on load event but not working
If Me.OEEMTDT.Value >= "92" Then
Me.OEEMTDT.BackColor = vbGreen
Else
Me.OEEMTDT.BackColor = vbRed
End If
Any ideas please on whats wrong here, is it the wrong vba, the wrong event trigger please?
Thanks
Jonny
I'd like the texbox backcolour to change to Green if >=92% or red if <92% but both conditional formatting tool and vba conditional formatting not working.
The textbox on the form has its backcolour set to normal not transparent also.
I've used the following vba but in the form on load event but not working
If Me.OEEMTDT.Value >= "92" Then
Me.OEEMTDT.BackColor = vbGreen
Else
Me.OEEMTDT.BackColor = vbRed
End If
Any ideas please on whats wrong here, is it the wrong vba, the wrong event trigger please?
Thanks
Jonny