Is there a way to “conditionally format” option groups containing toggle buttons on an MS Access form?
Here’s a method for highlighting the Back Color of the option group based on the value of the button selected. You need to make sure that the property for Back Style is set to Normal (Transparent is the default). The method requires VBA to accomplish the highlighting. Using your example, I’ve set the option group name to: ‘grpBooked’. The option group selections are Yes, No, and N/A (values 1, 2, and 3 respectively). I’ve chosen the back color to be set to GREEN for ‘Yes’, RED for ‘No’ and YELLOW’ for ‘N/A’ (for lack of anything better – you can change to whatever you deem necessary). Here’s the VBA code to accomplish the highlighting, an additional call for the procedure FormatGroup is necessary whenever the data might get changed by any other method than the form loading or the option group being clicked. Code: Private Sub Form_Load() FormatGroup End Sub Private Sub grpBooked_Click() FormatGroup End Sub Sub FormatGroup() Select Case grpBooked Case 1 grpBooked.BackColor = vbGreen Case