Connecting Tech Pros Worldwide Help | Site Map

Change background color of entire row(s)

Member
 
Join Date: Mar 2008
Posts: 111
#1: Oct 22 '08
Just wondering if this is possible. If i had a form displaying continuous data, can i change the background colour of certain rows if i state the syntax to which i require it to?
Moderator
 
Join Date: Feb 2008
Location: Beauly, near Inverness, Scotland
Posts: 1,576
#2: Oct 22 '08

re: Change background color of entire row(s)


The only way to do it is to use conditional formatting on, say, a rectangle object placed behind your controls on your form. In the query on which you base your subform include a calculated field whose value is, say, True if your condition that you need to test is satisfied and false otherwise, then use conditional formatting to change the background colour of the rectangle when the calculated field has the value True.

Reason you can't do it for the normal background of the form is that continuous forms comprise just one background and set of controls, repeated many times to display the rows (as explained in passing in NeoPa's article Why Values in Unbound Form Controls Don't Persist).

-Stewart
Reply