If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
My First IIF expression and conditional formatting...
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 a 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. -- Aria W. |
#2
|
|||
|
|||
My First IIF expression and conditional formatting...
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" wrote in message news 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 a 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. -- Aria W. |
#3
|
|||
|
|||
My First IIF expression and conditional formatting...
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" wrote: 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" wrote in message news 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 a 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. -- Aria W. |
#4
|
|||
|
|||
My First IIF expression and conditional formatting...
you're very welcome
"Aria" wrote in message ... 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" wrote: 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" wrote in message news 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 a 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. -- Aria W. |
Thread Tools | |
Display Modes | |
|
|