conditional formatting not working

Z

zkmoon

I have a subform that displays a datasheet. I want to change the background
color depending on a value in one of the fields. I CAN make this work by
using Conditional Formatting from the ribbon. My problem is that I want to
tweak colors, etc and would like to do this through vba. I have put this code
in Form_Open for the subform (declarations left out for simplicity):

Set objFrc =
Me.subfrmData.Controls("Subj").FormatConditions.Add(acFieldValue, acEqual,
"Math")
With objFrc
.FontBold = True
.BackColor = RGB(255, 0, 10)
End With

Compiles without error, I can step through and see the values being changed
properly....but no change in the display.

Suggestions? I'm pretty sure it's something easy...am ready to be
embarrassed for myself if I can just get this last little tweak working.....
LOL

Thanks in advance.

zkmoon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top