S
scott04
Hi everyone,
I have a report that is formated every other line on the report for
alternating colors. See Code:
Private shadeNextRow As Boolean
Const shadedColor = 6723891
' Const shadedColor = 15726583 ' alternative shade colors
' Const shadedColor = 14078404
' Const shadedColor = 13356495
' Const shadedColor = 14281974
Const normalColor = 16777215
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Detail_Format_Error
' Choose a color based on the shadeNextRow value
If shadeNextRow = True Then
Me.Section(acDetail).BackColor = shadedColor
Else
Me.Section(acDetail).BackColor = normalColor
End If
' Switch the color for the next row
shadeNextRow = Not shadeNextRow
Detail_Format_Exit:
Exit Sub
Detail_Format_Error:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Detail_Format_Exit
End Sub
In my database i was tracking the number of errors that were generated for a
lawsuit. Is there a way instead of formatting every other row a color,
formated it a different color if example there are more than 10 errors in the
record?? Any thoughts or suggestions is appreciated.
I have a report that is formated every other line on the report for
alternating colors. See Code:
Private shadeNextRow As Boolean
Const shadedColor = 6723891
' Const shadedColor = 15726583 ' alternative shade colors
' Const shadedColor = 14078404
' Const shadedColor = 13356495
' Const shadedColor = 14281974
Const normalColor = 16777215
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo Detail_Format_Error
' Choose a color based on the shadeNextRow value
If shadeNextRow = True Then
Me.Section(acDetail).BackColor = shadedColor
Else
Me.Section(acDetail).BackColor = normalColor
End If
' Switch the color for the next row
shadeNextRow = Not shadeNextRow
Detail_Format_Exit:
Exit Sub
Detail_Format_Error:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Detail_Format_Exit
End Sub
In my database i was tracking the number of errors that were generated for a
lawsuit. Is there a way instead of formatting every other row a color,
formated it a different color if example there are more than 10 errors in the
record?? Any thoughts or suggestions is appreciated.