= IFF(([我] [性别])="!M","男性","女&QUOT) [英] =Iff(([Me]![Gender])="M","Male","Female")

查看:86
本文介绍了= IFF(([我] [性别])="!M","男性","女&QUOT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提前致谢! ...我有两个文本框:1是可见的(根据隐形文本框得到它的

值,并显示男性或

女性,并且需要根据表中记录为M或F的值显示女性男性。

我试过:


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


''[Me]是表格,[性别]是文本框名称


这不起作用。


是我的语法错误或者我可以只有一个盒子及其显示值

显示女性如果记录显示F?

谢谢!Brian

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

推荐答案

当你说它不起作用时,你的意思是可见文本框是空的吗?或者,是否显示错误?


出于好奇,你为什么要使用两个文本框?我认为它可能是

使用单个组合框更简单。使其属性如此:


控制来源:性别

行来源类型:价值清单

行来源:M ;;男性;F;女性

列数:2

列头:否

列宽:0"

绑定列:1


这将为您提供一个包含两行的下拉列表。由于列

计数为2,因此M为M。和男性值是第一行

行和F行的两列。和女性是第二行的两列。

将列宽设置为0意味着第一列不会显示,但由于它是绑定列,因此它是M。和F将使用

作为Gender字段的值。希望这是有道理的。

When you say it doesn''t work, do you mean the visible text box is
empty? Or, does it display an error?

Out of curiousity, why are you using two text boxes? I think it might
be simpler to use a single combo box. Make its properties like so:

Control Source: Gender
Row Source Type: Value List
Row Source: "M";"Male";"F";"Female"
Column Count: 2
Column Heads: No
Column Widths: 0"
Bound Column: 1

This will give you a drop down list with two rows. Since the Column
Count is 2, the "M" and "Male" values are the two columns for the first
row and the "F" and "Female" are the two columns for the second row.
Setting the Column Width to 0" means the first column will not be
displayed but since it''s the Bound Column, the "M" and "F" will be used
as the value of the Gender field. Hope this makes sense.


我只想要两个显示男性。在我的文本框中,如果表中的值

是M。

I just want two display "Male" in my textbox if the value in the table
is "M".


好的,我想我刚刚发现你的问题。试试IIf而不是

" Iff。"

OK, and I think I just spotted your problem. Try "IIf" instead of
"Iff."


这篇关于= IFF(([我] [性别])="!M","男性","女&QUOT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆