Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting-add a back color property on report

Status
Not open for further replies.

scra

Technical User
Dec 7, 2001
55
US
I would like to add a back color on every other line to make the report more readable. Is there a special code under the properties?
 
Attach the following code to the report detail section’s OnFormat event:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If ((Me![RecordCounter] - 1) Mod 2 = 0) Then
Me.Detail.BackColor = 12632256
Else: Me.Detail.BackColor = 16777215
End If
End Sub

Of course you can choose whatever colors you want.

-Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top