G
Guest
I have a continuous form which displays project information, including project status. This status can be up to 7 color codes: red, yellow, green, blue, purple, grey, black. The form field displays the word, and should be highlighted with the appropriate color
I have read all the threads on this, and got Lebans example to work. However, it only works when the focus is on the record. When I run the function (below) field of all the records is colored by the last record processed. Can anyone assist me
Private Function SetStatusColor(ctl As Control) As Boolea
ctl.ForeColor = plWhit
Select Case ctl.Valu
Case "Green
ctl.BackColor = plGree
ctl.ForeColor = plBlac
Case "Red
ctl.BackColor = plRe
Case "Yellow
ctl.BackColor = plYello
ctl.ForeColor = plBlac
Case "Purple
ctl.BackColor = plPurpl
Case "Blue
ctl.BackColor = plBlu
Case Els
ctl.BackColor = plWhit
End Selec
End Functio
I have read all the threads on this, and got Lebans example to work. However, it only works when the focus is on the record. When I run the function (below) field of all the records is colored by the last record processed. Can anyone assist me
Private Function SetStatusColor(ctl As Control) As Boolea
ctl.ForeColor = plWhit
Select Case ctl.Valu
Case "Green
ctl.BackColor = plGree
ctl.ForeColor = plBlac
Case "Red
ctl.BackColor = plRe
Case "Yellow
ctl.BackColor = plYello
ctl.ForeColor = plBlac
Case "Purple
ctl.BackColor = plPurpl
Case "Blue
ctl.BackColor = plBlu
Case Els
ctl.BackColor = plWhit
End Selec
End Functio