Conditional formatting

B

BarbaraC

I have a report which contains a subreport that displays
a list of medical results. I am using conditional
formatting to alternately display a pale color behind the
results for every other row to make the report easier to
read. There are four fields containing data (next to
each other horizontally) and I created a text box that
displays behind the four fields and goes across the width
of the report which is what I assigned the conditional
formatting to.

The problem occurs when one of the four fields "grows".
How do I indicate that the text box that has the
background color should also "grow"? I could use
conditional formatting on each of the four fields to
change the background color I suppose, but I still have
the same problem if one field "grows" and the others do
not!
 
F

fredg

I have a report which contains a subreport that displays
a list of medical results. I am using conditional
formatting to alternately display a pale color behind the
results for every other row to make the report easier to
read. There are four fields containing data (next to
each other horizontally) and I created a text box that
displays behind the four fields and goes across the width
of the report which is what I assigned the conditional
formatting to.

The problem occurs when one of the four fields "grows".
How do I indicate that the text box that has the
background color should also "grow"? I could use
conditional formatting on each of the four fields to
change the background color I suppose, but I still have
the same problem if one field "grows" and the others do
not!

Why are you using a control behind the other controls to alternate
colors? Why not just alternate the Backcolor of the Detail section of
the report?

Make sure the BackStyle of each control is Transparent.

Code the Report's Detail Format event:

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 12632256 ' gray
Else
Me.Section(0).BackColor = vbWhite
End If
 
B

BarbaraC

Thank you. I'll give that a try! Seems obvious when you
hear it from someone else!
 

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