2012-03-16 45 views
0

我在MS Access查询设计视图这样多分钟少,我需要证明其具有计费重量比(在编辑搜索表单cboOperator2(文本)=>)min_New更多纪录(用户在编辑搜索表单中输入的文本框)和小于(在编辑搜索表单cboOperator2(文本)= <)max_New(用户在编辑搜索表单中输入文本框)。以下似乎没有工作,它也不给错误。这里是我,试图截图和表达。评估数比最大

searchq (query design view) screenshot

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] 
     ) 
    ) 
) 

回答

1

进行查询,其中,为了以查看哪些表达在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] 


不应该有一个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 
表达