D
Dwight
HI,
I am using a combo box on a form, so the user can select a "type" of
software which correcponds to cd's in a rack. I wanted to color each
value in the combo box so it corresponds with stickers on cd's. Anyway
i have used the floowing code :
Private Sub Combo72_BeforeUpdate(Cancel As Integer)
If Me![Combo72] = "Software" Then
Me!Combo72.ForeColor = vbRed
ElseIf Me![Combo72] = "Operating/Network System" Then
Me!Combo72.ForeColor = vbGreen
ElseIf Me![Combo72] = "Printer Driver" Then
Me!Combo72.ForeColor = vbYellow
ElseIf Me![Combo72] = "Patch/Update/SP" Then
Me!Combo72.ForeColor = vbBlue
ElseIf Me![Combo72] = "General Driver" Then
Me!Combo72.ForeColor = vbCyan
ElseIf Me![Combo72] = "Lab Software" Then
Me!Combo72.ForeColor = vbBlack
End If
End Sub
This changes colour of text due to selection but doesnt save it. It
only changes colour on selection, but if "Lab Software" was selected,
all values would stay black when searching, until a new entry was
added e.g "General Driver" thus changing the text to Cyan. Then all
searches would be Cyan until another value was added etc. It seems to
work using conditional formating but this only allows three
conditions.
Can anyone help
I am using a combo box on a form, so the user can select a "type" of
software which correcponds to cd's in a rack. I wanted to color each
value in the combo box so it corresponds with stickers on cd's. Anyway
i have used the floowing code :
Private Sub Combo72_BeforeUpdate(Cancel As Integer)
If Me![Combo72] = "Software" Then
Me!Combo72.ForeColor = vbRed
ElseIf Me![Combo72] = "Operating/Network System" Then
Me!Combo72.ForeColor = vbGreen
ElseIf Me![Combo72] = "Printer Driver" Then
Me!Combo72.ForeColor = vbYellow
ElseIf Me![Combo72] = "Patch/Update/SP" Then
Me!Combo72.ForeColor = vbBlue
ElseIf Me![Combo72] = "General Driver" Then
Me!Combo72.ForeColor = vbCyan
ElseIf Me![Combo72] = "Lab Software" Then
Me!Combo72.ForeColor = vbBlack
End If
End Sub
This changes colour of text due to selection but doesnt save it. It
only changes colour on selection, but if "Lab Software" was selected,
all values would stay black when searching, until a new entry was
added e.g "General Driver" thus changing the text to Cyan. Then all
searches would be Cyan until another value was added etc. It seems to
work using conditional formating but this only allows three
conditions.
Can anyone help