I built a form with 2 tabs. I would like to be able to change the tab color based on a pass/fail in a text box. I've been able to change color to the subform, header, and footer but not the tab using the VBA below. If the tab cannot be changed, I would like to change the color of the header for the main form based on pass/fail in a subform. Please help!
If Me.L1 = "fail" Then
FormFooter.BackColor = vbRed
FormHeader.BackColor = vbRed
Detail.BackColor = vbRed
ElseIf Me.L1 = "pass" Then
FormFooter.BackColor = vbGreen
FormHeader.BackColor = vbGreen
Detail.BackColor = vbGreen
Else
Detail.BackColor = 16777215
FormFooter.BackColor = 16777215
FormHeader.BackColor = 16777215