我在MS Access的查询设计视图中执行此操作,我需要显示收费超过(cboOperator2(编辑搜索表单中的文本框)=>)min_New(用户在编辑搜索表单中输入的文本框)的记录小于(cboOperator2(编辑搜索表单中的文本框)=<)max_New(用户在编辑搜索表单中输入文本框)。以下似乎不起作用,也没有给出错误。这是我正在尝试的屏幕截图和表达。
IIf(
[Forms]![Edit Search Form]![cboOperator2] Is Null Or
[Forms]![Edit Search Form]![min_NEW] Is Null Or
[Forms]![Edit Search Form]![max_NEW] Is Null Or
[Forms]![Edit Search Form]![cboOperator3] Is Null,
True,
IIf(
[Charge_Weight] Is Null,
Null,
Eval(
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator2] &
[Forms]![Edit Search Form]![min_New] &
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator3] &
[Forms]![Edit Search Form]![max_New]
)
)
)
答案 0 :(得分:1)
进行查询,返回
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator2] &
[Forms]![Edit Search Form]![min_New] &
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator3] &
[Forms]![Edit Search Form]![max_New]
以查看在Eval
中评估哪个表达式。
某处不应该有AND
吗?
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator2] &
[Forms]![Edit Search Form]![min_New] &
" AND " &
[Charge_Weight] &
[Forms]![Edit Search Form]![cboOperator3] &
[Forms]![Edit Search Form]![max_New]
产生类似
的表达式20 > 10 AND 20 < 100