Conditional Formatting In Report (1 Viewer)

Eyeswideopen11

New member
Local time
Yesterday, 19:56
Joined
Dec 9, 2022
Messages
19
I have a report based on member information and I want to change the text color of the members last name to red if they have not paid their dues. The paid dues field in the table is check box for either yes or no. I have been messing with this for about an hour and I think I am close I am just missing something.

IIf([DuesPaid])="No" then the conditional format

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:56
Joined
Oct 29, 2018
Messages
21,474
Try using False. e.g.
Code:
[DuesPaid]=False
or
Code:
Value Is False
 

Eyeswideopen11

New member
Local time
Yesterday, 19:56
Joined
Dec 9, 2022
Messages
19
After trying a few things I was able to get it to work when I removed the "" around No.
 

Eyeswideopen11

New member
Local time
Yesterday, 19:56
Joined
Dec 9, 2022
Messages
19
Glad to hear you got it sorted out. Good luck with your project.
Have to say this project is taking its toll on me. I sit at my desk for hours trying to figure out simple things because this is new to me. I want to figure it out but my brain just doesn't work that way. Thanks for the help.
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 19:56
Joined
Jan 23, 2006
Messages
15,379
Forum members are here to help/assist/point you to a solution. Ask specific questions---don't sit at your desk for hours.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:56
Joined
Feb 19, 2002
Messages
43,293
Rather than using Yes and No which are confused with strings and sometimes actually stored as strings, if the data type is Y/N (it's name is confusing you) it is NUMERIC so it is never a string. Yes and No are just ONE of the several format options for showing the value that the field hold. Other options are True/False, and a checkbox. Checked = -1 and unchecked = 0. With no formatting, you will see the actual value that is stored which is -1 and 0. The field always holds -1 for True and 0 for False and the sooner you understand that, the easier it will be for you to understand the code of others as well as what you see as data in a table that might just be formatted differently than the format you are using. True and False are much less likely to be confusing to you or to anyone else who reads the code. They are also universally used in all relational applications. Yes and No will only ever work in the very small context of Access. ThedbGuy gave you the answer. Did you try it or did you think he was wrong and so you experimented more with what you thought was the "correct" solution? When someone with as many points as thedbGuy, jdraw, and I have gives you a simple specific answer, it is very likely to be correct. Not 100% but very close:)
 

Eyeswideopen11

New member
Local time
Yesterday, 19:56
Joined
Dec 9, 2022
Messages
19
Rather than using Yes and No which are confused with strings and sometimes actually stored as strings, if the data type is Y/N (it's name is confusing you) it is NUMERIC so it is never a string. Yes and No are just ONE of the several format options for showing the value that the field hold. Other options are True/False, and a checkbox. Checked = -1 and unchecked = 0. With no formatting, you will see the actual value that is stored which is -1 and 0. The field always holds -1 for True and 0 for False and the sooner you understand that, the easier it will be for you to understand the code of others as well as what you see as data in a table that might just be formatted differently than the format you are using. True and False are much less likely to be confusing to you or to anyone else who reads the code. They are also universally used in all relational applications. Yes and No will only ever work in the very small context of Access. ThedbGuy gave you the answer. Did you try it or did you think he was wrong and so you experimented more with what you thought was the "correct" solution? When someone with as many points as thedbGuy, jdraw, and I have gives you a simple specific answer, it is very likely to be correct. Not 100% but very close:)
I didn't think anyone was wrong. I trust all the responses that I receive.
 

Eyeswideopen11

New member
Local time
Yesterday, 19:56
Joined
Dec 9, 2022
Messages
19
Rather than using Yes and No which are confused with strings and sometimes actually stored as strings, if the data type is Y/N (it's name is confusing you) it is NUMERIC so it is never a string. Yes and No are just ONE of the several format options for showing the value that the field hold. Other options are True/False, and a checkbox. Checked = -1 and unchecked = 0. With no formatting, you will see the actual value that is stored which is -1 and 0. The field always holds -1 for True and 0 for False and the sooner you understand that, the easier it will be for you to understand the code of others as well as what you see as data in a table that might just be formatted differently than the format you are using. True and False are much less likely to be confusing to you or to anyone else who reads the code. They are also universally used in all relational applications. Yes and No will only ever work in the very small context of Access. ThedbGuy gave you the answer. Did you try it or did you think he was wrong and so you experimented more with what you thought was the "correct" solution? When someone with as many points as thedbGuy, jdraw, and I have gives you a simple specific answer, it is very likely to be correct. Not 100% but very close:)
That's not what I thought at all. Please do not misinterpret anything. I asked a question and I got an answer, but for what I was specifically trying to do the removal of the "" worked. My previous attempts used True but did not work
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:56
Joined
Feb 19, 2002
Messages
43,293
As long as you know what the Y/N data type contains, you will be able to use it correctly and switch to the more universal True/False nomenclature which everyone will understand.
 

Users who are viewing this thread

Top Bottom