Alternate records/Colour Change (97/2000)

I have been playing around with this idea for some time now and can't quite get my head around it.

I often see database applications that how a subform or a view of records with each record in the view in alternately different colours i.e. green, yellow,green, yellow etc Specifically in Tabular view. If I design a Tabular subform, I usually set the Fill/Back Color manually. Is there a way in code/or other. that can change the colour to yellow and then green and then yellow etc alternately for each view?

Re: Alternate records/Colour Change (97/2000)

I have attached a database (zipped, Access 2000 format, but should work after converting in Access 97 too) that demonstrates various ways of highlighting rows in continuous forms, shamelessly copied from sources I have forgotten. Also, see <post#=288539>post 288539</post#>.

[quote name='HansV' post='382292' date='18-Jun-2004 07:30']I have attached a database (zipped, Access 2000 format, but should work after converting in Access 97 too) that demonstrates various ways of highlighting rows in continuous forms, shamelessly copied from sources I have forgotten. Also, see <post#=288539>post 288539</post#>.[/quote]
This is a very clever database, it contains just what i want to do.

How does it work?

Would you be so kind as to explain how the various forms work with their coluring of rows.

I think i understand how it works, but i dont know how the String function works. In some cases the number parameter is 40 in others 50, and always with lower case G.

The String function repeats a character a specified number of times. For example, String(10, "P") results in "PPPPPPPPPP".

In the sample database, the text box txtBackground is formatted with the Webdings font; the "g" character in this font is a filled box character. font size has been set to 24 so that 40 or 50 box characters fill the entire text box.

The Word document attached to Post 227297 explains how it works. It's for an earlier version of the sample database, so the details are a bit different, but the basic idea remains the same.