473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

reports/ can we alternate no shading and then shading for multiple records such as a phone directory to help distinguish

reports/ can we alternate formatting such as "no shading" and then
"shading" for multiple records such as a phone directory in Access2000
reports

Nov 13 '05 #1
3 3154
Add a text box to the Detail section of the report.
Give it these properties:
Control Source =1
Running Sum Over Group
Name txtCount
Format General Number
Visible No
You can make it as small as you like.

Add another text box to the Detail section, and make it the full size of the
Detail section. Use Send To Back on the Format menu so it lies behind the
other controls. Choose Conditional Formatting on the Format menu. Set the
first condition to:
Expression Is... [txtCount] Mod 2 = 0
and use the bucket icon to set the background color to the shade you desire.

How it works: the running-sum text box increments by 1 for each record. The
conditional formatting is applied if the value divided by 2 has a remainer
of 0, i.e. for every even number.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"buck" <ra****@kripalu.org> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
reports/ can we alternate formatting such as "no shading" and then
"shading" for multiple records such as a phone directory in Access2000
reports

Nov 13 '05 #2
On 16 Mar 2005 15:41:24 -0800, buck wrote:
reports/ can we alternate formatting such as "no shading" and then
"shading" for multiple records such as a phone directory in Access2000
reports


In a report? Sure.
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 only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3
Public Function ShadowAlternateLines()
'Call this from the On Format event of any report Detail section
' and you'll get alternating bands of white and grey background
'This depends on the original colour being grey or white
CodeContextObject.Section(0).BackColor =
Abs(CodeContextObject.Section(0).BackColor - 31646433)
End Function
Note: you need to set the controls backstyle to transparent ...

"buck" <ra****@kripalu.org> wrote in message news:<11**********************@o13g2000cwo.googleg roups.com>...
reports/ can we alternate formatting such as "no shading" and then
"shading" for multiple records such as a phone directory in Access2000
reports

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Mike Krous | last post by:
Hello All, I am having some problems modeling a relationship properly and could use some advice. My final question is at the bottom of this post (everything else is explanation). Basically what I...
1
by: jeffgeorge | last post by:
Using a bit of code to produce alternate line shading in a report. Seems it should work for a form as well but no luck. Does anyone have any ideas what I need to change or if it is even possible...
4
by: sparks | last post by:
We have a database that reads in and formats raw data. We were using queries to format the data per person and outputing reports. The other database has the persons personal information. I changed...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: ChadDiesel | last post by:
I've been posting questions here the last week, but if you don't know my situation: I have a "Print Labels" button on the subform that sends the appropriate box information on the subform to a...
3
by: joelpollock | last post by:
I'm having trouble continuously page numbering a large report in MS Access. The report is made up of three separate Access reports which I join together at the end. In the past I have opened the...
6
by: Mark A | last post by:
In version 8.2 ESE we used alternate fixpacks to allow multiple fixpack levels for different instances, and to allow an instance to be deprecated back to the previous fixpack (with certain...
3
by: simple simon | last post by:
How would I insert into multiple related tables using a table valued parameter? Is there any way to do this without using a WHILE loop? I know how to insert from a table valued parameter into one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.