I am trying to add alternate grey lines to a header. The reason I am using a header is because I'm using the header for summary information. I made the detail section not visible.
I looked on FAQ and it has this, which works in the detail section. I need to make my line alternate grey in the Header2 section. Does anyone know how to do this?
faq703-2684
You may want to make a report easier to read by having alternating gray lines. To do this, go to your report's properties and add an event procedure to your On Format of your detail section. The constant can be changed to whatever color you want (a quick way to get the number is to choose a background color in one of your forms, and then copy the number and paste it in code).
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Const vbLightGrey = 14540253
If Me.CurrentRecord Mod 2 = 0 Then
Me.Section(acDetail).BackColor = vbLightGrey
Else
Me.Section(acDetail).BackColor = vbWhite
End If
End Sub
I looked on FAQ and it has this, which works in the detail section. I need to make my line alternate grey in the Header2 section. Does anyone know how to do this?
faq703-2684
You may want to make a report easier to read by having alternating gray lines. To do this, go to your report's properties and add an event procedure to your On Format of your detail section. The constant can be changed to whatever color you want (a quick way to get the number is to choose a background color in one of your forms, and then copy the number and paste it in code).
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Const vbLightGrey = 14540253
If Me.CurrentRecord Mod 2 = 0 Then
Me.Section(acDetail).BackColor = vbLightGrey
Else
Me.Section(acDetail).BackColor = vbWhite
End If
End Sub