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 I show a different color every other line in a report?



 
 
Thread Tools Display Modes
  #1  
Old May 15th, 2007, 04:57 PM posted to microsoft.public.access.reports
Mark10101010
external usenet poster
 
Posts: 6
Default How do I show a different color every other line in a report?

I would like to make every other line of data on my report grey...how can I
do this?

Any help would be greatly appreciated.

Thanks,
Mark
  #2  
Old May 15th, 2007, 05:17 PM posted to microsoft.public.access.reports
Rick Brandt
external usenet poster
 
Posts: 4,354
Default How do I show a different color every other line in a report?

Mark10101010 wrote:
I would like to make every other line of data on my report grey...how
can I do this?

Any help would be greatly appreciated.

Thanks,
Mark


In the OnFormat event of the section...

If Me.Details.BackColor = 12632256 Then
Me.Details.BackColor = 16777215
Else
Me.Details.BackColor = 12632256
End if

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #3  
Old May 15th, 2007, 05:22 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default How do I show a different color every other line in a report?

On Tue, 15 May 2007 08:57:00 -0700, Mark10101010 wrote:

I would like to make every other line of data on my report grey...how can I
do this?

Any help would be greatly appreciated.

Thanks,
Mark


Make sure the BackStyle of each control is Transparent.

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 Grey so that the
first detail line will become white

Change the colors as needed.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old May 15th, 2007, 08:59 PM posted to microsoft.public.access.reports
Mark10101010
external usenet poster
 
Posts: 6
Default How do I show a different color every other line in a report?



"Rick Brandt" wrote:

Mark10101010 wrote:
I would like to make every other line of data on my report grey...how
can I do this?

Any help would be greatly appreciated.

Thanks,
Mark


In the OnFormat event of the section...

If Me.Details.BackColor = 12632256 Then
Me.Details.BackColor = 16777215
Else
Me.Details.BackColor = 12632256
End if

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com




Got it...Thank You!
 




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


All times are GMT +1. The time now is 12:28 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.