I have a problem with conditional formatting on subforms which I wonder if somebody can help me with.
I have created a couple of subforms, and programmatically added this conditional formatting on the Load event :
strCond = “forms(‘fsubMainAssets’)!txtCategory=’S’ or forms(‘fsubMainAssets’)!txtCategory=’T'”
Me!txtAmount.FormatConditions.Delete
Set ftc = Me!txtAmount.FormatConditions.Add(acExpression, , strCond)
With ftc
.FontBold = True
.BackColor = gclngBackColor
End With
This works perfectly when I open the subform on its own. However, when I open the parent form on which the subform is located, the code runs but has no effect. I have tried using a Repaint, Requery and Refresh on the subform, but that has no effect either.
Does anyone have any ideas as to why this is not working, and how to get round it ?
Usual thanks for your expert help