shirt10
asked on
How To Set A Forms Background Color To Be One of X Colors?
Hey all,
I have a small access database which my department enters review information into all day.
Last week for April Fools I added the code below to randomly set the background color below for some (and for three of the guys to always set it to hot pink).
Private Sub Associate_LostFocus()
Select Case Associate
Case "Mary Anderson", "Kelly Wright"
Me.Section(acDetail).BackC
Case "Nick Dormer", "Shawn Justice", "Earl Onstott"
Me.Section(acDetail).BackC
Case Else
Me.Section(acDetail).BackC
End Select
End Sub
This turned out to be a big hit, and I now have a request from them to alternate between a list of 5-10 specific colors (they are picking them out at the moment!!!).
Is there an small, easy code I can use instead of above to acomplish this?
Thanks in advance
--Ben--
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
' random:
Me.Detail.Backcolor = varColors(Int(Rnd()*UBound
(°v°)