Conditional formatting for an entire record of a report.

  • Thread starter Thread starter Steve Hart via AccessMonster.com
  • Start date Start date
S

Steve Hart via AccessMonster.com

I accidently posted this under forms, when it should be here.

I'm playing with conditional formatting in a report. I've got a one
character field that is properly changing color if the value is "A".

Unfortunately, as one character it doesn't show up real well. Is there a
way to change the color of the entire line (record) based on the value of
this one field?

Steve
 
You can use code in the On Format event of the section to set the back
color.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.txtBoxName = "A" Then
Me.Detail.BackColor = 10092543
Else
Me.Detail.BackColor = vbWhite
End If
End Sub

Duane Hookom
MS Access MVP
 
Back
Top