Hi
The short answer is 'Yes'
If you want the colour to change immediately after combo2 has been set then you will need to put code in the After_Update event of combo2.
If you want the colours to persist and change according to the priority when you are browsing through the records you will have to put the same code into the On_Current event of the Form.
You could change the colour of the text in the combo or it's back colour, or if you wanted to go overboard you could change the colour of the Header section etc
- Private Sub combo2_AfterUpdate()
-
If Me.combo2 = 2 Then Me.combo2.BackColor = RGB(250, 0, 0)
-
If Me.combo2 = 2 Then Me.combo2.ForeColor = RGB(255, 255, 255)
-
If Me.combo2 = 2 Then Me.Form.Section(acHeader).BackColor = vbRed
-
If Me.combo2 = 2 Then Me.Form.Section(acDetail).BackColor = vbBlack
-
If Me.combo2 = 2 Then Me.Form.Section(acFooter).BackColor = vbBlue
-
End Sub
You can use the set 'vb' colours or mix your own using the RGB() function.
Get the idea? (don't forget to drop the u in colour)
Sorry, I have just read your last line! You will have to use If ...ElseIf construction to do what you want. I'll let you do that bit and you can have fun mixing your amber and green colours !
S7