Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Solution to Print Field in color?

Status
Not open for further replies.

Rick4077

Technical User
Oct 19, 2004
149
US
When printing or viewing a report I would like to have certain fields printed in a specific color. At times with an exact name and other times with the use of a wildcard.

Something like

Code:
If Scmls.ListName="FIRST TEAM" then
Print In color orange
else Print in Black

What about code that will place a wildcard after "FIRST TEAM*"

Thanks much . . . Rick
 
Have a look at conditional formatting. In report's Design View: Format->Conditional Formatting. Then you can set your conditions and formatting as you wish it.

Ken S.
 
You know I did that but I didn't have the correct syntax and kept getting an error.

I'll try it again.

Thanks . . . Rick
 
Nope I can't figure how the syntax is.

It fails with everything I try.

Any ideas?

Rick
 
I've also tried in the Conditional Formatting Expression field this . . .

Code:
If Trim([Scmls.SellName] & "") = "" Then     (SellName.ForeColor) = 16777215 End If

If [FieldValue] is Equal to
Code:
"COLDWELL BANKER NRT*" then [Scmls.SellName])=16777215 End If

Nothing seems to work.

I searched the database for "Conditionl Formating" but no answers there.

Any ideas?
 
Try this...

1) Open your report in design view and select the field for which you wish to apply conditional formatting, i.e. SellName, then open the conditional formatting dialogue (Format->Conditional Formatting)

2) As an example, for a wildcard expression, select "Expression is" under Condition 1 and in the expression field, put: [SellName] Like "COLDWELL BANKER NRT*"

3) Immediately beneath the expression field is a field that shows you the formatting that will be applied when the condition is met. Immediately to the right of that field are buttons to apply the formatting you wish, i.e. bold, underline, italics, fill color, etc. Use those to set the formatting you desire. Select OK once done, then preview your report to see if the results are as you wish.

Post back if you have further difficulty.

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top