Highlight report line

  • Thread starter PeteN via AccessMonster.com
  • Start date
P

PeteN via AccessMonster.com

I need to highlight/shade any lines in a printed report where date 1 = date2,
how do I accomplish this?
 
R

Rob Parker

Conditional Formatting is your friend here. Check the Help for details if
it's not blindingly obvious. You'll need a criteria of {date1] = [date2] in
there somewhere; and you'll need to apply it to all the controls in the
report section.

HTH,

Rob
 
J

John Spencer

Select all the controls in the detail line and set their Back Style to
TRANSPARENT. You can select all the textbox and label controls at one time
and set the Back style property of all them at the same time.

Add VBA code to the detail section's format eventto change the back color of
the section depending on the values of the two controls (or fields)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.ControlA <> Me.ControlB then
Me.Section(acDetail).BackColor = vbWhite
else
Me.Section(acDetail).BackColor = 13882323 'Light Grey
End If
End Sub


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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