iif statement color Please Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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???
 
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.
 
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???
 
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
 
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.
 

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

Similar Threads


Back
Top