Alternating line color

wizcow

Registered User.
Local time
Today, 15:39
Joined
Sep 22, 2001
Messages
236
I have an idea that would make my lists easier to read.

If line 1 had a white background
and line 2 had a yellow background
and line 3 had a white background again
line 4 yellow again, and so on.

I would like to do this in my forms and in reports.

Does anyone have coding ideas to accomplish this?

Thanks
Tom
 
In Access 2000 and later, use "Conditional Formating" under the "Format" menu when a field is selected.

For Access 97 and earlier, there is no solution.

[This message has been edited by llkhoutx (edited 06-01-2002).]
 
Aloha...

I just read something this morning about doing that in reports. I don't have the book with me, but the info was in Access 97 Developer's Handbook, 3rd ed. (Litwin, Getz, and Gilbert) in the chapter about Reports.

Do you have access to the book?

Tana
 
Aloha, again...

I don't know if it's legal to type the code from the book into a forum. Anybody know?

The essence of it is to code the BackColor property of the report section to equal one of two colors by using an IIf statement. If the color is white, for example, set the color to blue, and vice versa for the next section.

The code assumes that the back color of the controls is transparent.

In my version of the book, the code and explanation are on pages 570 and 571 of Chapter 9: Topics in Report Design.

Tana
 
Thank you both for your reply, but I still don't get it.

Tom
 
Actually Ive seen alot of code from that book on this forum. The book states you can reuse code provided you credit the authors so I would guess it's ok.
 

Users who are viewing this thread

Back
Top Bottom