【问题标题】:DSUM Formula Not WorkingDSUM 公式不起作用
【发布时间】:2017-03-22 05:16:52
【问题描述】:

我的数据库查询中有一个 DSUM 公式,该公式使用以下公式计算发票上要支付的剩余未付金额。

它在大多数情况下都可以正常工作,但是它在发票尚未有任何付款的情况下不起作用,在这种情况下,没有可参考的付款并且公式会在公式单元格。

我该如何更改以下内容以使其适用于没有付款的发票?

非常感谢

付款前未偿金额:IIf([Invoice Amount]=0,0,IIf([Invoice Amount]-Nz(DSum("[Amount Paid]","Payments Table Combined with Invoice Table"," [Invoice Number] = " & [Invoice Number] & " And [Payment Date]

【问题讨论】:

    标签: ms-access ms-access-2013


    【解决方案1】:

    您可以减少这个并使用 Nz 作为一个空的付款日期:

    Amount Outstanding Before Payment: IIf([Invoice Amount]=0,0,[Invoice Amount]-Nz(DSum("[Amount Paid]","Payments Table Combined with Invoice Table","[Invoice Number] = " & [Invoice Number] & " And Nz([Payment Date],Date()) < " & Format(Nz([Payment Date],Date()),"\#yyyy-mm-dd\#") & ""),0))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-05
      • 1970-01-01
      • 1970-01-01
      • 2019-01-08
      • 1970-01-01
      相关资源
      最近更新 更多