G
Guest
I need to make the text in a combo box different colors, depending on the
status field I have - is there a way to do this
Thanks in advanced
status field I have - is there a way to do this
Thanks in advanced
Sprinks said:Hi, Kuraige.
Sure. Change it via a Select Case statement and by changing the ForeColor
property. You will need to put this code in the form's OnCurrent event
procedure and the Status AfterUpdate event procedure:
Select Case Me!Status
Case firstcase
' Change to Red
Me!YourTextBoxName.ForeColor = 255
Case secondcase
' Change to Bright Green
Me!YourTextBoxName.ForeColor = 65280
Case thirdcase
' Another case
....
Case Else
' Put default color here
End Select
To determine the appropriate color codes, simply select a color in form
design view, and see how Access changes the ForeColor property.
HTH
Kevin Sprinkel