On 30 Dec 2005 11:23:17 -0800,
ca************* **@yahoo.com 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","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
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","Fe male")
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