Re: =Iff(([Me]![Gender])="M","Male","Female")
- From: fredg <fgutkind@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Dec 2005 13:48:11 -0800
On 30 Dec 2005 11:23:17 -0800, campbellbrian2001@xxxxxxxxx wrote:
> 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","Female")
>
> '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
1) You cannot use the Me keyword in an Access control source.
And as has already been pointed out by others, the function is IIF not
IFF.
Try:
=IIf(([Gender]="M","Male","Female")
Make sure the name of this control is not "Gender".
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.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.
- Follow-Ups:
- Re: =Iff(([Me]![Gender])="M","Male","Female")
- From: David W. Fenton
- Re: =Iff(([Me]![Gender])="M","Male","Female")
- From: Lyle Fairfield
- Re: =Iff(([Me]![Gender])="M","Male","Female")
- References:
- =Iff(([Me]![Gender])="M","Male","Female")
- From: campbellbrian2001
- =Iff(([Me]![Gender])="M","Male","Female")
- Prev by Date: Re: Carry data over to new record...
- Next by Date: Re: Database design question
- Previous by thread: Re: =Iff(([Me]![Gender])="M","Male","Female")
- Next by thread: Re: =Iff(([Me]![Gender])="M","Male","Female")
- Index(es):
Relevant Pages
|