A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how do make all lines in a report alternate in shades of grey



 
 
Thread Tools Display Modes
  #1  
Old February 17th, 2006, 08:25 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default how do make all lines in a report alternate in shades of grey

how do you do that in Access 2002????
  #2  
Old February 17th, 2006, 08:44 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default how do make all lines in a report alternate in shades of grey

try

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

With Me.Section(acDetail)
If .BackColor = vbLightGrey Then
.BackColor = vbWhite
Else
.BackColor = vbLightGrey
End If
End With

End Sub

instead of the VBA color constants, you can use the numeric value of any two
colors you choose. by adding ElseIf conditions, you can rotate between three
or more colors.

hth


"YuRboy_MN" wrote in message
...
how do you do that in Access 2002????



  #3  
Old February 17th, 2006, 08:45 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default how do make all lines in a report alternate in shades of grey

On Fri, 17 Feb 2006 12:25:28 -0800, YuRboy_MN wrote:

how do you do that in Access 2002????


I assume you mean all the Detail section rows.

The same way you do it in any other Access version.

Make sure the BackStyle of each control is Transparent.
Change the colors as needed.

Code the Detail Format event:

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 12632256 ' gray
Else
Me.Section(0).BackColor = vbWhite
End If

====
If you wish each page to start with a white row, code the Page Header
Format event:

Me.Detail.BackColor = 12632256 'Reset color to gray so that the
first detail line will become white


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Reports Access 2002 Pleas Advise Dermot Database Design 12 October 5th, 2005 11:23 AM
Graying of alternate lines of a report Jim Benson Setting Up & Running Reports 1 September 18th, 2005 03:11 AM
Help!! I'm running around in circles! CathyA New Users 19 December 12th, 2004 07:50 PM
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 06:24 AM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM


All times are GMT +1. The time now is 08:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.