|
7#
楼主 |
发表于 2005-11-17 18:11:00
|
只看该作者
Case Is = 9
Me.T1 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 1 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T2 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 2 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T3 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 3 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T4 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 4 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T5 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 5 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T6 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 6 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T7 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 7 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T8 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 8 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T9 = Nz(DLookup("[9月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T10 = Nz(DLookup("[10月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T11 = Nz(DLookup("[11月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.T12 = Nz(DLookup("[12月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)Me.S1 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 1 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S2 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 2 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S3 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 3 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S4 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 4 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S5 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 5 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S6 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 6 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S7 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 7 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S8 = Nz(DSum("实际出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 8 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S9 = Nz(DSum("计画出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 9 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S10 = Nz(DSum("计画出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 10 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S11 = Nz(DSum("计画出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 11 And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.S12 = Nz(DSum("计画出荷", "出荷计画", "year(出荷日) ='" & Me.lian & "' And month(出荷日) = 12 And 产品名称 ='" & Me.产品名称 & "'"), 0)Me.C1 = Nz(DLookup("[1月]", "盘点差异", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.C2 = Nz(DLookup("[2月]", "盘点差异", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.C3 = Nz(DLookup("[3月]", "盘点差异", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)
Me.C4 = Nz(DLookup("[4月]", "盘点差异", "[年份] ='" & Me.lian & "' And 产品名称 ='" & |
|