conditional formatting or code

L

Little pete

I want to highlight various tasks which have not been completed by a
particular date. I have a yes/no box to indicate it has been completed at
form level but want the system to do some 'smarts' using the current date etc
when a report is run.

The problem I have is the data used to indicate the status is not the data I
want to highlight, so I think I may have to use code rather than
conditionally formatting. Can some one please point me in the right
direction and hopefully to some information?

Cheers thanks for the help
 
L

Little pete

Playing around with this at the moment

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If DateDiff("mmm", Oct, Date) >= 1 Then
ContractorName.BackColor = 16764057
Else
ContractorName.BackColor = 255
End If

End Sub

But am getting
Run time error '424'
object required.

Have hunted through the net to try and workout where I am wrong but not
understanding it enough.

Thanks for the help in advance
 
D

Duane Hookom

You don't have to reference the value of the changing format control in
conditional formatting. You can use an Expression that references other
fields and returns a true or false.
 
L

Little pete

Duane could you please expand on this a little further my Access knowledge is
growing day by day but your lost me.

Thanks
 
D

Duane Hookom

When using conditional formatting there is a dropdown that allows you to
select either "Field Value Is" or "Condition Is". Your "Condition" could be
something like:
[CompleteDate]<=DateAdd("m",3,[StartDate])
 
Top