Fill Color for entire row

milkman2500

Registered User.
Local time
Yesterday, 23:50
Joined
Oct 21, 2012
Messages
45
Hi,

I'm trying to create a report that has certain rows filled with a background color. In excel, the fill color is complete across the row. That is, there are no gaps between cells. In Access, each individual "cell" or field is filled with the color but inbetween each cell/field there is white space. I tried changing the control padding to "narrow" but there is still too much white space. Changing control padding to "none" changes the alignment of the cells to look off. They aren't exactly lined up in a row anymore. It looks terrible.

Does anyone have any recommendations on best practices for using fill color in reports?

Thanks.
 
I actually just did what you are describing.

The term is Conditional Formatting.

I had a report in which I wanted to change the background of an entire record based on an expression...can be one field value or a simple calculation.

The solid background color for the row was created with an unbound text box which spans the entire row. I gave it the name 'yellow' since that's the conditional format color.

Play with the Back Style, Border Style and Back Color of the data fields as well as sending the 'yellow' text box to the back...behind the other data fields and then navigate to the conditional formatting for that text box. Test your settings with one data field and then copy the formatting as desired to the rest. Hopefully this attached image makes sense.
 

Attachments

  • yellow.jpg
    yellow.jpg
    50.6 KB · Views: 333
You can set the background of all your controls to transparent, handle the Format event of the report section in question and conditionally set the background color of the entire section.

Code:
Private Sub Detail_Format(PrintCount as Integer, FormatCount As Integer)
   If SomeCondition Then Me.Detail.BackColor = 255
End Sub
 

Users who are viewing this thread

Back
Top Bottom