473,750 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

=Iff(([Me]![Gender])="M","Male","F emale")

Thanks in Advance! ... I have two textboxes: 1 is visible (and gets its
value based on the invisible textbox and displays either "Male" or
"Female", and needs to display either male of female based on the value
that comes up in the tables record as "M" or "F".
I tried:

=Iff(([Me]![Gender])="M","Male","F emale")

'the [Me] is form, [Gender] is the textbox name

and this does not work.

Is my syntax wrong or can I just have one box and its displayed value
display "Female" if the record says "F"?
Thanks! Brian

Dec 30 '05
22 22361
BB
>Oh yeah, in the form header I have two images, one of King Kong and the
other of Jessica Lange; their visibility is controlled by Male - Yes or
No.


You'll have to update that to Naomi Watts now.

Dec 31 '05 #11
I don't want to hurt Jessica's feeling so I'll use one of each!

Dec 31 '05 #12
fredg <fg******@examp le.invalid> wrote in
news:1c******** *************** ******@40tude.n et:
2) Why a field that stores "M" or "F"? Why not just simply store
"Male" or "Female"? Or since there are only the 2 choices, why not
a Check Box field? Then in a regular unbound text control on your
report, set the control source to the CheckBox field and have it's
Format property set to:
;"Male";"Female "
assuming Male is the checked value.


Why not checked = Female?

I would never represent something that is neutral by using a
Boolean.

Second, in cases where the value is unknown, there is no way to
store that using a Boolean field.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 31 '05 #13
"Lyle Fairfield" <ly***********@ aim.com> wrote in
news:11******** **************@ f14g2000cwb.goo glegroups.com:
I just use a bit field named Male with conditional formatting to
turn the background color of all fields blue when Male is true,
(while their default backbround color is pink).
Oh yeah, in the form header I have two images, one of King Kong
and the other of Jessica Lange; their visibility is controlled by
Male - Yes or No.
Works great; you'd be surprised how impressed prospective clients
are. Their eyebrows go right up.


I'll bet they do.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 31 '05 #14
"David W. Fenton" <XX*******@dfen ton.com.invalid > wrote
;"Male";"Female "
assuming Male is the checked value.
Why not checked = Female?


If I understood correctly, he was explaining why he used the particular
format. If so, the answer to your question would be: Because that Format
doesn't work if "checked = Female"; it would be ;"Female";"Male ".
I would never represent something that is neutral by using a
Boolean.
What's neutral in this case?
Second, in cases where the value is unknown, there is no way to
store that using a Boolean field.


Unknown, I can understand; neutral, I can't, without explanation.

Larry
Dec 31 '05 #15
"Larry Linson" <bo*****@localh ost.not> wrote in
news:rJptf.1944 $aB1.729@trnddc 02:
"David W. Fenton" <XX*******@dfen ton.com.invalid > wrote
;"Male";"Female "
assuming Male is the checked value.


Why not checked = Female?


If I understood correctly, he was explaining why he used the
particular format. If so, the answer to your question would be:
Because that Format doesn't work if "checked = Female"; it would
be ;"Female";"Male ".


???

The issue was about using a Boolean to represent the two values,
male or female. The suggestion was that TRUE would indicate
maleness. My question is only over why male was chosen as TRUE and
female as FALSE.

I don't want to sound politically correct or anything, but it's
exactly the kind of thing that I find annoying, because of the
assumption that the male case should be the TRUE one.

In any event, I believe that it's *not* a Boolean value, so it
oughtn't be stored in a Boolean field.
I would never represent something that is neutral by using a
Boolean.


What's neutral in this case?


Sex. Male is neither better nor worse than female. Maleness is not a
negation of femaleness.
Second, in cases where the value is unknown, there is no way to
store that using a Boolean field.


Unknown, I can understand; neutral, I can't, without explanation.


There's an unintended implied value judgement in making one of them
TRUE and one FALSE, seems to me, and it would be better to avoid
such assumptions.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 31 '05 #16
I agree David. I, for one, have never had a female lie to me!

Dec 31 '05 #17
On Sat, 31 Dec 2005 14:20:48 -0600, David W. Fenton wrote:
"Larry Linson" <bo*****@localh ost.not> wrote in
news:rJptf.1944 $aB1.729@trnddc 02:
"David W. Fenton" <XX*******@dfen ton.com.invalid > wrote
;"Male";"Female "
assuming Male is the checked value.

Why not checked = Female?
If I understood correctly, he was explaining why he used the
particular format. If so, the answer to your question would be:
Because that Format doesn't work if "checked = Female"; it would
be ;"Female";"Male ".


???

The issue was about using a Boolean to represent the two values,
male or female. The suggestion was that TRUE would indicate
maleness. My question is only over why male was chosen as TRUE and
female as FALSE.

I don't want to sound politically correct or anything, but it's
exactly the kind of thing that I find annoying, because of the
assumption that the male case should be the TRUE one.

In any event, I believe that it's *not* a Boolean value, so it
oughtn't be stored in a Boolean field.
I would never represent something that is neutral by using a
Boolean.


What's neutral in this case?


Sex. Male is neither better nor worse than female. Maleness is not a
negation of femaleness.
Second, in cases where the value is unknown, there is no way to
store that using a Boolean field.


Unknown, I can understand; neutral, I can't, without explanation.


There's an unintended implied value judgement in making one of them
TRUE and one FALSE, seems to me, and it would be better to avoid
such assumptions.


David,
I think you are making a mountain over a mole hill.
In my reply to the OP I specifically wrote:
and have it's Format property set to: ;"Male";"Female "

**assuming Male is the checked value.**

There is no implied judgment of True being better than False.

I could just as well have assumed Female was the checked value and
re-written the Format, or made no assumption at all and let the OP
figure it out for himself, which he may or may not have done.

If a value judgment were to be made regarding True and False, one
could say that True (value of -1) is less valued than False (value of
0). Does that make you feel any better? Or worse? It shouldn't.

His post referred to Male or Female. It did not refer to Male, Female,
Undecided, or Both. If he had, I would not have suggested the check
box as it would not have applied.

Let's keep this thread on the subject of what would work for the
poster, not what may or may not be politically correct from your view
point (or from mine).

And yes, I could just as easily have expanded my reply to include an
option group and a combo box as other possible controls to use.

Best wishes for the New Year.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jan 1 '06 #18
rkc
fredg wrote:
And yes, I could just as easily have expanded my reply to include an
option group and a combo box as other possible controls to use.


I favour the King Kong and (I'm gonna go with Fay Wray) images approach
myself.
Jan 1 '06 #19
David W. Fenton wrote:
I would never represent something that is neutral by using a
Boolean.


Nor I. It's simply unbelieveable how people looking through your data
structure can get bent out of shape over stuff that you had no intention
of implying. To avoid that in this case, I'd take my "Oracle" approach.

Oracle does not have yes/no data types. If I want a yes/no field, I
specify a text field with a length of 1 or 3 (varchar2(1) or
varchar2(3)) and impose a column level check constraint that limits
allowable values to only 'Y' and 'N' (or 'YES' and 'NO'). SO you can
see where this is going.

In Jet, what I've done in the past is set up a similar constraint by
setting a text field length to 1 and setting the validation rule to:

="M" Or "F"

With a validation text of:

The only permissable values are F(emale) or M(ale).

And there ya go.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Jan 1 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.