Dates & Cond Format

  • Thread starter Thread starter Ickus
  • Start date Start date
I

Ickus

I have a series of records with a 'date inputted' date.
I'm now trying to do conditional formatting in a report to highlight all
records that are 3 months and older.
I'm baffled
Please help
 
Open the report in design view
Click on the control you want to use conditional formatting on
Select Conditional Formatting from the Format menu
Set Condition as
Field Value is : Less Than : DateAdd("m",-3,Date())
Select what you want for highlighting for this control.

If you are trying to highlight the entire row instead of just one control,
post back. I would usually handle that in the format event with some vba code.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
(...)
I have a series of records with a 'date inputted' date.
I'm now trying to do conditional formatting in a report to highlight all
records that are 3 months and older.

You do not need to use conditional formatting. Write this event procedure
instead:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If DateDiff("m", Me!DateField , Date) >= 3 Then
Me.Section(0).BackColor = RGB(255, 0, 0)
Else
Me.Section(0).BackColor = RGB(255, 255, 255)
End If
End Sub


K.P.
 
Back
Top