G
Gaby Sandoval
I am trying to apply conditional formatting. i have to use code
since
i have 10 different conditions. basically, i want to change the
color
of the font color and backgroud color of a text box (txtRoleName)
based on the value.
I tried writing an If statement on the details part of the form, but
i
can't seem to get it to work. I cant find a value that works. I
tried using *ctrl *space after i type in my texbox anme, but cant
find
anything that seems like it would work from the drop down that
appears. Here is the logic i would like to follow:
If txtRoleName.Value = "Student" Then
txtRoleName.FontColor = vbRed
txtRoleName.ForeColor = vbGreen
ElseIF txtRoleName.Value = "Faculty" Then
txtRoleName.FontColor = vbGreen
txtRoleName.ForeColor = vbRed
since
i have 10 different conditions. basically, i want to change the
color
of the font color and backgroud color of a text box (txtRoleName)
based on the value.
I tried writing an If statement on the details part of the form, but
i
can't seem to get it to work. I cant find a value that works. I
tried using *ctrl *space after i type in my texbox anme, but cant
find
anything that seems like it would work from the drop down that
appears. Here is the logic i would like to follow:
If txtRoleName.Value = "Student" Then
txtRoleName.FontColor = vbRed
txtRoleName.ForeColor = vbGreen
ElseIF txtRoleName.Value = "Faculty" Then
txtRoleName.FontColor = vbGreen
txtRoleName.ForeColor = vbRed