Sub-Form Control Backcolor based on varying criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that displays only two fields : Category and ColorCode.
I input a category, (i.e. "Sexual Abuse") and the code will search the
appropriate table and pull the colorcode as being "Red" and display the text
in the ColorCode control on the subform. No problem.

However, the attorney involved wants me to be able to color the background
of the control to red. I can do that no problem, except that all colorcodes
then are displayed as red. There could be many categories being displayed on
the sub form, as in:

Sexual Abuse Red
Physical Abuse Purple
Intimidation Green etc.

The attorney wants quick visual access when in court using a laptop, to be
able to show the red category in red, the purple in purple, and green in
green, etc.

Is is possible on a sub-form that really only uses one control and
replicates itself as needed for display? I thought I once saw some code to
this effect, but????????
 
Change the BackColor of the Detail section of the subform (form) to yr
liking.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
 
Thanks for the reply, but unfortunately, it doesn't address the question.
Each field on the sub-form needs to be able to have its own color, and
changable as the criterion changes. Just changing the detail section won't
do it.
 
Select the field that has the criteria you want and right click to select
Conditional Formatting. You can change the color value of the font and
background based on the value of each individual field.

HTH
Damon
 
Back
Top