More than one conditional format

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
 
F

fredg

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
 
S

sunflower

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top