Conditional formatting a field

G

Guest

I am having trouble with getting a conditional formatting to work. I read in
the help that if you have more than one condition, Access is supposed to take
the first true condition and apply it. Well that doesn't seem to be working.
I have a staff roster which lists everyone and their phone numbers, home and
cell. Now some people don't want their numbers listed, either one or both.
We need to have a copy for our on-call book that shows at least one number
for an individual for supervisors. I have it showing everyone's home number,
no matter what their mark was for showing their number. I then put on the
cell/other number field these two conditions. First, if [PhoneNumber]=Null,
show the number, or basically have the number appear in black text.
Condition 2 is [ShowCell/Other]=No, format the number as white, so it matches
the background and is not visible.

Now if it's supposed to take the first true condition, it should show
anyone's cell number it they don't have a phone number, but if they have a
phone number, it should hide the cell number. It's not working, it's hiding
everyone's cell number, no matter what order I put these conditions in.
Anyone have any ideas as to why it's not working??
 
S

Steve Schapel

Shanin,

[PhoneNumber]=Null will not work. This will always be false, and is not
valid syntax for what you are trying to do. Try like this...
[PhoneNumber] Is Null
 
G

Guest

Thanks, that worked. I figured it was something simple I was overlooking.

Steve Schapel said:
Shanin,

[PhoneNumber]=Null will not work. This will always be false, and is not
valid syntax for what you are trying to do. Try like this...
[PhoneNumber] Is Null

--
Steve Schapel, Microsoft Access MVP

I am having trouble with getting a conditional formatting to work. I read in
the help that if you have more than one condition, Access is supposed to take
the first true condition and apply it. Well that doesn't seem to be working.
I have a staff roster which lists everyone and their phone numbers, home and
cell. Now some people don't want their numbers listed, either one or both.
We need to have a copy for our on-call book that shows at least one number
for an individual for supervisors. I have it showing everyone's home number,
no matter what their mark was for showing their number. I then put on the
cell/other number field these two conditions. First, if [PhoneNumber]=Null,
show the number, or basically have the number appear in black text.
Condition 2 is [ShowCell/Other]=No, format the number as white, so it matches
the background and is not visible.

Now if it's supposed to take the first true condition, it should show
anyone's cell number it they don't have a phone number, but if they have a
phone number, it should hide the cell number. It's not working, it's hiding
everyone's cell number, no matter what order I put these conditions in.
Anyone have any ideas as to why it's not working??
 

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