views:

163

answers:

1

I have a continuous form that contains a drop down box whos control source is the id of a record in a support table. The bound column is this support element id. The row source of the drop down list is a query that gets 2 text fields based on the id in the bound column... the first text field is simply text that is displayed... the 2nd text field is a color. these are actual number color codes for access that the user can enter in by changing the color of a box and saving that particular color

for each of the records in the continuous form, they have one of these levels... Blank, Red Yellow or Green... I want the field that displays the color name to have its background color changed to the color that is in the 3rd column of the drop down...

Any ideas?

A: 

You're looking for Conditional Formatting. This article will explain how to use Conditional Formatting to do pretty much whatever you want with the background colors:

http://msdn.microsoft.com/en-us/library/aa139965(office.10).aspx

Robert Harvey
i've looked at conditional formatting, but i'm unable to determine if its possible to make changes at run time. While they have only 4 levels right now... in 2 - 3 months... it is possible they may add additional levels.
Patrick
Review the second section in the article: "Programming Conditional Formats." It should be possible to create a generalized routine that will allow the users to add conditions and colors.
Robert Harvey
The problem with other techniques, IIRC, is that they will inevitably color the entire column of text boxes, instead of a single text box. Conditional formatting is the only way to do this, AFAIK.
Robert Harvey