Text color on individual records in a list

  • Thread starter Thread starter Carrie
  • Start date Start date
C

Carrie

I have a listing of dates in a continuous subform. There
are many dates, and some of them should be highlighted in
red.

I have a flag on each date and when the flag is true, the
record should be red.

Can that be done? If so - how?
 
Looking more closely at the sample databases that Dev Ashish and Kevin Gray
provide at http://www.mvps.org/access/forms/frm0024.htm, I think that you
might be able to make the same technique work for you.

In the subform, the alternating line colors are adjusted by the
ColorHighlight control with the formula: =IIf([Text26] Mod 2,[Text26],"").
Depending on whether the row number is even or odd, the text in the
ColorHighlight control is "" or contains a value formatted with a string of Û
characters which, effectively, hides the background color of the control with
the foreground color.

You might be able to use something like: =IIf([YourCriteriaField] =
TheCriteria,[YourCriteriaField],""). If you place this behind your date field
having a transparent background, this might work to highlight the date.

Marvin
 
I have a listing of dates in a continuous subform. There
are many dates, and some of them should be highlighted in
red.

I have a flag on each date and when the flag is true, the
record should be red.

Can that be done? If so - how?

What version of Access?
Access 2000 or newer you can use the control's Conditional Formatting
property.
Select the control (in Design View).
Click Format + Conditional formatting.

Set the Condition1 to
Field Value is
equal to
your criteria

Select your color and save the changes.
 
Thanks, fredg. That's very helpful.

fredg said:
What version of Access?
Access 2000 or newer you can use the control's Conditional Formatting
property.
Select the control (in Design View).
Click Format + Conditional formatting.

Set the Condition1 to
Field Value is
equal to
your criteria

Select your color and save the changes.
 
Back
Top