B
Bret
Please help.
In my form text boxes, I have a function tied to the event
procedure that changes the 'BackColor' of the box based on
the a calculated percentage.
My fields fill in successfully but the textbox doesn't
change color. I've used the "repaint" code with no success.
The code is below. thanks.
Private Sub Text77_AfterUpdate()
Dim p As Variant
p = Me.Text82.Value
Text82.BackColor = Fill_AttainBackColor(p)
Me.Repaint
End Sub
Event Procedure above calls function below passing the
percentage contained in textbox.
Function Fill_AttainBackColor(p)
' Text54.BackColor = Fill_AttainBackColor(P)
Select Case p
Case Is <= 0.7999999999
Fill_AttainBackColor = 255
Case Is >= 80#, Is <= 0.9499999999
Fill_AttainBackColor = 8454143
Case Is >= 0.95
Fill_AttainBackColor = 65280
End Select
End Function
In my form text boxes, I have a function tied to the event
procedure that changes the 'BackColor' of the box based on
the a calculated percentage.
My fields fill in successfully but the textbox doesn't
change color. I've used the "repaint" code with no success.
The code is below. thanks.
Private Sub Text77_AfterUpdate()
Dim p As Variant
p = Me.Text82.Value
Text82.BackColor = Fill_AttainBackColor(p)
Me.Repaint
End Sub
Event Procedure above calls function below passing the
percentage contained in textbox.
Function Fill_AttainBackColor(p)
' Text54.BackColor = Fill_AttainBackColor(P)
Select Case p
Case Is <= 0.7999999999
Fill_AttainBackColor = 255
Case Is >= 80#, Is <= 0.9499999999
Fill_AttainBackColor = 8454143
Case Is >= 0.95
Fill_AttainBackColor = 65280
End Select
End Function