Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date conditional formatting 1

Status
Not open for further replies.

BrockLanders

Programmer
Dec 12, 2002
89
US
I'm trying to change the font color of a field based on the value of another field on my report. If ETA is greater than required delivery date, the value in the ETA field should have a font color of red and bold. However, ETA is red regardless if it's greater or not. Below is my code that I placed in the detail format of the report:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.ETA > Me.ReqdDeliv_Date Then
        Me.ETA.ForeColor = vbRed
        Me.ETA.FontBold = True
    End If
End Sub
Is there some type of syntax that I'm missing?
Thanks
 
I don't see any code that sets the color back to black. You need an "Else..." section to set the colors and boldness.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
D'OH!!! Sorry to waste your time with such an easy question. Have a star for not insulting me while at it.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top