设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

12下一页
返回列表 发新帖
查看: 1518|回复: 14
打印 上一主题 下一主题

[其它] 工程太大该咋办??

[复制链接]
跳转到指定楼层
1#
发表于 2005-11-17 17:42:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
工程太大该咋办??在下认为代码不是很多,也没有出现死循环,就是提示工程太大,它不执行了?!!!!!!!!!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2005-11-17 17:56:00 | 只看该作者
是在什么时候提示的? 请说得清楚些..............
3#
 楼主| 发表于 2005-11-17 18:06:00 | 只看该作者
运行的时候,代码不执行而直接打开工程,提示:工程太大!!!!!!!!!!!!!!!1
4#
 楼主| 发表于 2005-11-17 18:10:00 | 只看该作者


Private Sub 主体_Print(Cancel As Integer, PrintCount As Integer)

On Error GoTo Err_Fresh_Click

Dim i As Integer'◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇Select Case Year(Now())Case Is > Me.lianMe.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(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 9 And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T10 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 10 And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T11 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 11 And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T12 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 12 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月]", "盘点差异", "[年份] ='"
5#
 楼主| 发表于 2005-11-17 18:10:00 | 只看该作者
    Case Is = 3

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(DLookup("[3月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T4 = Nz(DLookup("[4月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T5 = Nz(DLookup("[5月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T6 = Nz(DLookup("[6月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T7 = Nz(DLookup("[7月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T8 = Nz(DLookup("[8月]", "生产计画", "[年份] ='" & Me.lian & "' 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 = 0

Me.C4 = 0

Me.C5 = 0

Me.C6 = 0

Me.C7 = 0

Me.C8 = 0

Me.C9 = 0

Me.C10 = 0

Me.C11 = 0

Me.C12 = 0'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Case Is = 4

Me.T1 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 1 And 产品
6#
 楼主| 发表于 2005-11-17 18:10:00 | 只看该作者
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Case Is = 6

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(DLookup("[6月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T7 = Nz(DLookup("[7月]", "生产计画", "[年份] ='" & Me.lian & "' And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T8 = Nz(DLookup("[8月]", "生产计画", "[年份] ='" & Me.lian & "' 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月]", "盘点差异", "
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 产品名称 ='" &amp
8#
 楼主| 发表于 2005-11-17 18:11:00 | 只看该作者
Case Is = 12

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(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 9 And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T10 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 10 And 产品名称 ='" & Me.产品名称 & "'"), 0)

Me.T11 = Nz(DSum("入库数量", "生产实际", "year(入力日) ='" & Me.lian & "' And month(入力日) = 11 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(
9#
 楼主| 发表于 2005-11-17 18:28:00 | 只看该作者
select case year(now())case >me.liancase =me.lian       select case month(now())       case =1       case =2       case =3       case =4       case =5       case =6       case =7       case =8       case =9       case =10       case =11       case =12       end selectend select结构如上
10#
 楼主| 发表于 2005-11-17 18:47:00 | 只看该作者
585行代码就超标了????
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2025-1-28 12:11 , Processed in 0.118568 second(s), 34 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表