问题描述
基于选择查询构建一个表单,其中包含一个组合框(3个选项)
表单标题,它将为查询提供一个值。在
查询的标准中,我添加了以下表达式 - [Forms]![Form_1]!
[Combo_1],这就像一个魅力。但是我的一个用户希望在选择三个
选项之一之前看到所有值。
我添加了选择全部到我的组合下拉列表,并尝试按照iif语句后的
作为标准:
iff([Forms]![Form_1]![Combo_1] =" All",喜欢*,[Forms]![Form_1]!
[Combo_1])
我原来的3个选择仍然有用,但不是我的所有的" ;.我曾尝试过Like
*",Is Not Null和*但似乎没什么用。
有什么建议吗?
Built a form based on a select query with a combo box (3 choices) in
the form header which will supply a value to the query. In the
query''s criteria I added the following expression - [Forms]![Form_1]!
[Combo_1] and this works like a charm. However one of my users wanted
to see all of the values before choosing one of the three
selections.
I added the choice "All" to my combo dropdown list and tried the
following iif statement as the criteria:
iff([Forms]![Form_1]![Combo_1]="All",Like "*",[Forms]![Form_1]!
[Combo_1])
My original 3 choices still work but not my "All". I have tried "Like
"*"", "Is Not Null" and "*" but nothing seems to work.
Any suggestions?
推荐答案
[表格]![Form_1]![Combo_1]
....然后在下一个下标准行......
[表格]![Form_1]![Combo_1] =" All"
-
Rick Brandt,Microsoft Access MVP
电子邮件(视情况而定)至...
在Hunter dot com的RBrandt
[Forms]![Form_1]![Combo_1]
....and then under that on the next criteria row...
[Forms]![Form_1]![Combo_1] = "All"
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
[表格]![Form_1]![Combo_1]
...然后根据下一个标准排...
[表格]![Form_1]![Combo_1] =" All"
-
Rick Brandt,Microsoft Access MVP
电子邮件(视情况而定)至...
在Hunter dot com的RBrandt-隐藏引用的文字 -
- 显示引用的文字 -
[Forms]![Form_1]![Combo_1]
...and then under that on the next criteria row...
[Forms]![Form_1]![Combo_1] = "All"
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com- Hide quoted text -
- Show quoted text -
Rick,
我应该忘记IIF声明并使用
建议的下一个标准?
Rick,
Should I forget the IIF statement and use the next criteria as you
suggest?
[表格]![Form_1]![Combo_1]
...然后根据下一个标准排...
[表格]![Form_1]![Combo_1] =" All"
-
Rick Brandt,Microsoft Access MVP
电子邮件(视情况而定)至...
在Hunter dot com的RBrandt-隐藏引用的文字 -
- 显示引用的文字 -
[Forms]![Form_1]![Combo_1]
...and then under that on the next criteria row...
[Forms]![Form_1]![Combo_1] = "All"
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com- Hide quoted text -
- Show quoted text -
Rick,
我应该忘记IIF声明并使用
建议的下一个标准是什么?
Rick,
Should I forget the IIF statement and use the next criteria as you
suggest?
是的。
-
Rick Brandt,Microsoft Access MVP
电子邮件(视情况而定)至...
在Hunter dot com的RBrandt
Yes.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
这篇关于iif查询条件中的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!