I inherited a MS Access database and at my new job. I don't know much about Access and they asked if I could make every other line of a report a different color so it is easier to read. Is there an easy way to do this?
Asked
Active
Viewed 1,354 times
1 Answers
4
This is pretty easy to do. The easiest way I found to do this is to use the following code:
Option Explicit
Dim ColorDetail As Boolean
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If ColorDetail Then
Detail.BackColor = 16777215
Else
Detail.BackColor = 13290186
End If
ColorDetail = Not (ColorDetail)
End Sub

Linger
- 14,942
- 23
- 52
- 79
-
Hey, thanks for responding. A clear cut answer is what I was looking for. It worked great and made the co-workers happy. – Dan Thomas Mar 28 '12 at 20:46
-
Your welcome, not all solutions have to be difficult, :). Glad I could help – Linger Apr 03 '12 at 15:07
-
1Ah that is a typo it should of been ColorDetail. I have corrected the answer. – Linger Apr 04 '12 at 18:31