Format Question

S

scott04

I have the following code that makes each line red when the number of
workingdays >10:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If WorkingDays2([Date_Filed], [Summary_Date]) > 10 Then
Me.Section(acDetail).BackColor = 255
Else
Me.Section(acDetail).BackColor = 16777215
End If
Everything works fine however upon looking at the report i would rather have
the row of fields in my report change font color to red instead of the
section. One of the fields in the report is me.case_no. I have tried to add
the code of :
If WorkingDays2([Date_Filed], [Summary_Date]) > 10 Then
Me.Case_No.ForeColor = vbRed
However all records are now showing in Red and not just the ones with more
than 10 days. Any thoughts or suggestions?
 
E

Evi

All you have to do, is to add the bit that says
Else
Me.Case_No.ForeColor = vbBlack
End if
 

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