sgladie@bgsu.edu
Registered User.
- Local time
- Today, 13:13
- Joined
- Jul 3, 2015
- Messages
- 28
Access 2013
I am trying to format a field within a report. I have the event on the On Format of Detail. Two fields, if one is greater than the other, make the font red, if not, black. Here is my code:
Dim ct As Integer
Dim tc As Integer
ct = Me.TextOverUnder
tc = Me.TextAvg
If ct > tc Then
Me.TextOverUnder.ForeColor = vbRed
Else
Me.TextOverUnder.ForeColor = vbBlack
End If
If TextOverUnder is greater than TextAvg make the font red, if not, black. I can't seem to get it to work. If I put ct > 0, then it does it, but not for the field. What am I missing? Thanks!:banghead:
I am trying to format a field within a report. I have the event on the On Format of Detail. Two fields, if one is greater than the other, make the font red, if not, black. Here is my code:
Dim ct As Integer
Dim tc As Integer
ct = Me.TextOverUnder
tc = Me.TextAvg
If ct > tc Then
Me.TextOverUnder.ForeColor = vbRed
Else
Me.TextOverUnder.ForeColor = vbBlack
End If
If TextOverUnder is greater than TextAvg make the font red, if not, black. I can't seem to get it to work. If I put ct > 0, then it does it, but not for the field. What am I missing? Thanks!:banghead: