Al Campagna replied to Megaton
20-Nov-09 10:12 PM
Megaton,
Use the OnFormat event for the report section where your control is
located.
Let's say it is in the Detail section, and the control is named Balance.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Balance < 0 Then
Me.Balance.Forecolor = QBColor(12) 'lt red
ElseIf Balance = 0 Then
Me.Balance.Forecolor = QBColor(0) 'black
ElseIf Balance > 0 Then
Me.Balance.Forecolor = QBColor(14) 'lt yellow
End if
End Sub
You did not indicate what color 0 was, so I included it...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html