Each alternate record a different colour?

dwilliams

Registered User.
Local time
Today, 05:36
Joined
Jul 29, 2006
Messages
22
Hi,

I am trying to produce either a report or a form that displays records 1 to a line. That bits easy enough using a tabular layout.
I would like to make text boxes that hold the data a differnt colour on each alternate line. So the background colour changes from white, then green, white , green etc.

Anyone give me a starter on this one please?

Thank you

David Williams
 
In a report, you can do an "OnFormat" event before the line is appended to the report body. OnFormat events are associated with report SECTIONS so you would have a detail-section OnFormat event.

In the class module of the form, you can allocate a flag, byte, Boolean, take your pick...

Inside that Detail - OnFormat event, you could have some sort code that flips the flag from state A to state B and chooses the background color of the line (actually, of the single-line record) as appropriate.

However, it seems to me that I recall a report wizard that could build this for you automagically. Toy around with the report wizard's available styles to see if one exists that tickles your fancy.
 
Alternate colour - thank you all

Thanks very much for all the help - brilliant. I got loads to go on now. Sorry about the duplicate thread.
 

Users who are viewing this thread

Back
Top Bottom