Conditional formatting for an entire record of a report.

  • Thread starter Steve Hart via AccessMonster.com
  • 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
 
D

Duane Hookom

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
 

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