Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change text color for alternate lines

Status
Not open for further replies.

benwah

Technical User
Jun 27, 2001
97
GB
Hi

I am using Access 97.

I have a report based upon a query that grabs all the records whose car registration number occures more than once in the db.

What i want to do is change text color so the first lot of duplicates are black, next is red, then next is black etc.

for example:

XCV12PL builder 01/01/2001
XCV12PL resident 06/01/2001
RTL29EF film 05/12/2000
RTL29EF work 13/02/2001
RTL29EF film 28/03/2001
ADB97MS doctor 05/05/2001
ADB97MS dppf 06/05/2001

Is it possible?

thanks in advance
wah
 
yes. To do so, look at the detail section events OnFormat. In this event (sub), keep the value of the field to use as the trigger. If the last one isn't the same as the current, do the color change. ALWAYS keep the current "key" as the last "key".

It is more common to manipulate the backcolor to achieve this effect, normally alternating between LtGrey and White, setting the background of all of the controls to transparent.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top