Originally Posted by
June7
I suggest you start exploring and experimenting. Instead of radio buttons and option group control could have a combobox with 3 value choices. Combobox is easier to understand. Then the other two criteria would be textboxes with calculations to produce the values.
A simple IIf expression in the overall status textbox would be like:
IIf([comboboxname]="R" Or [textboxname1]="R" Or [textboxname2]="R", "R", "G")
So you can see how complex this will be for different color combinations. Use VBA to build a custom function that has input argument(s). The code could be like:
Function GetOverallStatus(ColorCode) As String
Select Case ColorCode
Case "RRR"
GetOverallStatus = "red"
Case "GGR"
GetOverallStatus = "green"
Case "GRR"
etc. continue this exercise in logic to get the desired output based on the input
End Select
End Function
Call the function from textbox:
=GetOverallStatus([comboboxname] & [textboxname1] & [textboxname2])
Then use the ConditionalFormatting from the ribbon Design tab to set conditions for color display. There will be 3 conditions, one for each color, which is convenient because Access 2007 allows only 3 conditions.