Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option Button Color

Status
Not open for further replies.

kcmark

Technical User
Nov 2, 2002
63
US
I am working with a continuous form that includes a dashboard of various items, including several option buttons that indicate the status of various projects. I am trying to figure out a way to format the option buttons similar to a red-light / green-light system - where if the value is yes then the option button would turn green and if no then red. As I see it the only way to do this would be to change the background color of the option button to red if the value is no; and change the background color and the button color to green is the value is yes. In theory, it seems like it should work, but I cannot seem to figure out a way to do this. Any ideas?
 
Does the BorderColor property suffice ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi, you could place a label behind the option button:

Private Sub Option0_Click()
Select Case Me.Option0
Case 0
Me.Label1.BackColor = vbRed
Case -1
Me.Label1.BackColor = vbGreen

End Select
End Sub

Hth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top