Full Version: Continuous Form, Different Color Text Boxes
UtterAccess Forums > Microsoft® Access > Access Forms
sselph
I have a continuous form with text boxes. I want to be able to set the backcolor of the text boxes based upon a value of another text box on the same form. However, when I set the backcolor, it applies it to all of the all of the text boxes on all of the continuous forms. Is there a way to apply it differently to each form?
doctor9
You might want to take a look at Conditional Formatting for this.
Hope this helps,
Dennis
mishej
Dennis pointed you in the right direction - "conditional formatting".
Roger_Carlson
On my website, www.rogersaccesslibrary.com there is a small sample database called: ConditionalFormatting.mdb which shows how to use Conditional Formatting in a variety of situations.
sselph
That does work, but is limited to (3) conditions. What to do when there are more than (3) conditions?
Thanks.
doctor9
sselph,
How many conditions DO you need to work with?
Dennis
ChrisO
G’day all.
efore saying any more, the following demo is based on an article found here, it goes back away: -
http://www.mvps.org/access/forms/frm0024.htm
The attached demo has 5 levels of ‘conditional formatting’ but also works from Access97 to Access 2003; it should still work in latter versions…worth testing.
There should be no restriction on the level of conditional formatting except for the need to do so and the perseverance required.
I’ve attached an Access 97 version so that people can test for themselves if it still works in > Access 2003.
The demo does background formatting only but I think it could also be changed to do foreground formatting as well.
The demo leaves open all the possible states for the formatting but is, at the moment, restricted to the 5 levels.
There is not much code required, and it could be reduced, but the idea as stated in the above link is still a bit of a 'head banger'.
Have fun pulling it apart and see how you go.
Regards,
Chris.
sselph
I need to work with (5) conditions. I will look at the sample database provided.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.