More than one conditional format

  • Thread starter Thread starter sunflower
  • Start date Start date
S

sunflower

Is it possible to have more than one conditional format on text in a report?
I need the text to be red if the value is "Not Started", black if the value
is "In Process", or gray if the value is "Completed".

any help is appreciated
 
Is it possible to have more than one conditional format on text in a report?
I need the text to be red if the value is "Not Started", black if the value
is "In Process", or gray if the value is "Completed".

any help is appreciated

Conditional formatting of a control will allow up to 3 conditions.
in Report Design View, select the control and then click on Format +
Conditional Formatting.

You can also use Code in the Detail Section's Format event.
If [SomeControl] = "Not Started" then
[SomeControl].ForeColor = vbRed
ElseIf [SomeControl] = "In Process" Then
[SomeControl].ForeColor = vbBlack
Else
[SomeControl].ForeColor = 12632256
End If
 
Thanks..both work great...which is the preferred method?

fredg said:
Is it possible to have more than one conditional format on text in a
report?
I need the text to be red if the value is "Not Started", black if the
value
is "In Process", or gray if the value is "Completed".

any help is appreciated

Conditional formatting of a control will allow up to 3 conditions.
in Report Design View, select the control and then click on Format +
Conditional Formatting.

You can also use Code in the Detail Section's Format event.
If [SomeControl] = "Not Started" then
[SomeControl].ForeColor = vbRed
ElseIf [SomeControl] = "In Process" Then
[SomeControl].ForeColor = vbBlack
Else
[SomeControl].ForeColor = 12632256
End If
 
Back
Top