My First IIF expression and conditional formatting...

A

Aria

Hello,
This is the my first IIF expression that I am trying and I was wondering if
someone could provide an assist. I have a report for a school database that
list the substitute teachers and their preferred subjects. This report is for
school emergencies (teacher X is involved in (fill in the reason here) and
won't be able to make it).

Time is now of the essence. I want to call the substitute who can hit the
ground running, so my first calls will be to those subs who have listed the
subject as one of their preferred *and* who have a degree or credential in
the field.

My original report didn't include the credential/degree information so I
have tried to correct that by adding the following to the control source for
txtCredential:

=IIf([Credentials]=True,"Yes","No")

It works but when I tried to use conditional formatting to make "Yes" bold I
received the following message:

The expression you entered contains invalid syntax.

My questions are:
1. Is there something wrong with my expression? I took out the comma after
"True" but that didn't help.

2. To make "Yes" bold, do I add another condition with field value = Yes and
then make it bold?

Thank you for any suggestions you can provide.
 
T

tina

your post isn't entirely clear. you're using an expression in the
ControlSource property of a textbox named txtCredential, right? and that
expression is

=IIf([Credentials]=True,"Yes","No")

and it works correctly, right? but are you using the same expression in the
ConditionalFormatting dialog? if so, there's your problem. you need to tell
Access to make the value in txtCredential bold when *the value of
Credentials = True*, period. so, try the following expression in the
ConditionalFormatting dialog:

[Credentials] = True

hth
 
A

Aria

Hi Tina,
Aw, gee, how easy was that! I'm sorry if things weren't clear but you did a
good job deciphering what I was trying to do. Perfect! Thanks!
--
Aria W.


tina said:
your post isn't entirely clear. you're using an expression in the
ControlSource property of a textbox named txtCredential, right? and that
expression is

=IIf([Credentials]=True,"Yes","No")

and it works correctly, right? but are you using the same expression in the
ConditionalFormatting dialog? if so, there's your problem. you need to tell
Access to make the value in txtCredential bold when *the value of
Credentials = True*, period. so, try the following expression in the
ConditionalFormatting dialog:

[Credentials] = True

hth


Aria said:
Hello,
This is the my first IIF expression that I am trying and I was wondering if
someone could provide an assist. I have a report for a school database that
list the substitute teachers and their preferred subjects. This report is for
school emergencies (teacher X is involved in (fill in the reason here) and
won't be able to make it).

Time is now of the essence. I want to call the substitute who can hit the
ground running, so my first calls will be to those subs who have listed the
subject as one of their preferred *and* who have a degree or credential in
the field.

My original report didn't include the credential/degree information so I
have tried to correct that by adding the following to the control source for
txtCredential:

=IIf([Credentials]=True,"Yes","No")

It works but when I tried to use conditional formatting to make "Yes" bold I
received the following message:

The expression you entered contains invalid syntax.

My questions are:
1. Is there something wrong with my expression? I took out the comma after
"True" but that didn't help.

2. To make "Yes" bold, do I add another condition with field value = Yes and
then make it bold?

Thank you for any suggestions you can provide.
 
T

tina

you're very welcome :)


Aria said:
Hi Tina,
Aw, gee, how easy was that! I'm sorry if things weren't clear but you did a
good job deciphering what I was trying to do. Perfect! Thanks!
--
Aria W.


tina said:
your post isn't entirely clear. you're using an expression in the
ControlSource property of a textbox named txtCredential, right? and that
expression is

=IIf([Credentials]=True,"Yes","No")

and it works correctly, right? but are you using the same expression in the
ConditionalFormatting dialog? if so, there's your problem. you need to tell
Access to make the value in txtCredential bold when *the value of
Credentials = True*, period. so, try the following expression in the
ConditionalFormatting dialog:

[Credentials] = True

hth


Aria said:
Hello,
This is the my first IIF expression that I am trying and I was
wondering
if
someone could provide an assist. I have a report for a school database that
list the substitute teachers and their preferred subjects. This report
is
for
school emergencies (teacher X is involved in (fill in the reason here) and
won't be able to make it).

Time is now of the essence. I want to call the substitute who can hit the
ground running, so my first calls will be to those subs who have
listed
the
subject as one of their preferred *and* who have a degree or credential in
the field.

My original report didn't include the credential/degree information so I
have tried to correct that by adding the following to the control
source
for
txtCredential:

=IIf([Credentials]=True,"Yes","No")

It works but when I tried to use conditional formatting to make "Yes"
bold
I
received the following message:

The expression you entered contains invalid syntax.

My questions are:
1. Is there something wrong with my expression? I took out the comma after
"True" but that didn't help.

2. To make "Yes" bold, do I add another condition with field value =
Yes
and
then make it bold?

Thank you for any suggestions you can provide.
 

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