I am stumped as to why the BackColor for labels on an MS Access subform will not update visually. I wrote some code to change the BackStyle to "1" first, then changed the color of BackColor. I ran tests and found that the BackStyle and BackColor have actually been updated in the system, but not in the Property Sheet--- which still shows BackStyle as "0" and BackColor as the default color. The color of the label on the subform also retains the default color. I also get no error messages, but that doesn't mean I'm not royally messing something up. I even tried to repaint the form to see if that would do the trick, but to no avail. Here is the simple code below:
[COLOR=var(--highlight-keyword)]Dim[/COLOR] frm [COLOR=var(--highlight-keyword)]As[/COLOR] Form
[COLOR=var(--highlight-keyword)]Dim[/COLOR] ctl [COLOR=var(--highlight-keyword)]As[/COLOR] Control
[COLOR=var(--highlight-keyword)]Set[/COLOR] frm = [COLOR=var(--highlight-keyword)]Me[/COLOR]![subfrm_Review Forecast Totals].Form
[COLOR=var(--highlight-keyword)]For[/COLOR] [COLOR=var(--highlight-keyword)]Each[/COLOR] ctl [COLOR=var(--highlight-keyword)]In[/COLOR] frm.Controls
[COLOR=var(--highlight-keyword)]If[/COLOR] ctl.ControlType = acLabel [COLOR=var(--highlight-keyword)]And[/COLOR] ctl.Name = [COLOR=var(--highlight-variable)]"2020-12-25_Label"[/COLOR] [COLOR=var(--highlight-keyword)]Then[/COLOR]
ctl.BackStyle = [COLOR=var(--highlight-namespace)]1[/COLOR]
ctl.BackColor = vbGreen
[COLOR=var(--highlight-keyword)]End[/COLOR] [COLOR=var(--highlight-keyword)]If[/COLOR]
[COLOR=var(--highlight-keyword)]Next[/COLOR] ctl
[COLOR=var(--highlight-keyword)]Me[/COLOR].Repaint
End Sub