iif statement color Please Help!

J

JOM

I have an iif statement as folows
iif([Urgent]=true,"**"&[tblEmployee].[EmplName]
&"**",[tblEmployee].[EmplName])

I would like to make the part ,"**"&[tblEmployee].[EmplName] &"**" a
different color... How would I do that in my Query???
 
D

Douglas J. Steele

You can't in a query.

If you're using a form, assuming you're using Access 2000 or newer, you can
use Conditional Formatting.
 
J

JOM

ok, so how will I do that for the listbox

Douglas J. Steele said:
You can't in a query.

If you're using a form, assuming you're using Access 2000 or newer, you can
use Conditional Formatting.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



JOM said:
I have an iif statement as folows
iif([Urgent]=true,"**"&[tblEmployee].[EmplName]
&"**",[tblEmployee].[EmplName])

I would like to make the part ,"**"&[tblEmployee].[EmplName] &"**" a
different color... How would I do that in my Query???
 
F

fredg

I have an iif statement as folows
iif([Urgent]=true,"**"&[tblEmployee].[EmplName]
&"**",[tblEmployee].[EmplName])

I would like to make the part ,"**"&[tblEmployee].[EmplName] &"**" a
different color... How would I do that in my Query???

In your query, you can't!

If the query is used as record source for a report, you can change the
control's color in the report.
You can either use the control's conditional formatting property
or ...
Code the Report Section's (Detail) Format event:
If [Urgent] = -1 Then
[AControl].ForeColor = vbRed
Else
[AControl].ForeColor = vbBlack
End if
 
F

fredg

ok, so how will I do that for the listbox

Douglas J. Steele said:
You can't in a query.

If you're using a form, assuming you're using Access 2000 or newer, you can
use Conditional Formatting.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)

JOM said:
I have an iif statement as folows
iif([Urgent]=true,"**"&[tblEmployee].[EmplName]
&"**",[tblEmployee].[EmplName])

I would like to make the part ,"**"&[tblEmployee].[EmplName] &"**" a
different color... How would I do that in my Query???

OK. You posted this same question about list boxes just a bit earlier.
The answer hasn't changed since then.
You cannot format individual lines in a list box.
 
Top