web 2.0


Alternate row color in an Access Report

This tip shows you how to use VBA to alternate the row color of an Access report. Many times, when creating a report, we find it hard to read the details. By alternating the row color we can make life much simpler...

 

 Private rowCount As Long
 
  Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
 
    rowCount = rowCount + 1
 
    If rowCount / 2 = CLng(rowCount / 2) Then
      Me.Detail.BackColor = 16777215
    Else
      Me.Detail.BackColor = 15263976
    End If
  End Sub

Tags: , ,

Microsoft Access | Microsoft Access - VBA

Comments

elviscortijo.com , on 4/15/2011 11:52:41 AM Said:

pingback

Pingback from elviscortijo.com

Alternar Colores de Filas en Reporte de Access

Comments are closed