⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmonthsum.frm

📁 this is my first software.
💻 FRM
📖 第 1 页 / 共 4 页
字号:
    rs.LockType = adLockReadOnly
    rs.CursorType = adOpenForwardOnly
    productClass = "单片"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanPianIn.Caption = "0"
    Else
        lblDanPianIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "复合片"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblFuHeIn.Caption = "0"
    Else
        lblFuHeIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "轧花片"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblYaHuaIn.Caption = "0"
    Else
        lblYaHuaIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "淋膜制品"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblLinMoIn.Caption = "0"
    Else
        lblLinMoIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "定位包装"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDingWeiIn.Caption = "0"
    Else
        lblDingWeiIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "棒材"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblBangIn.Caption = "0"
    Else
        lblBangIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "管材"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblGuanIn.Caption = "0"
    Else
        lblGuanIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "网材"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblWangIn.Caption = "0"
    Else
        lblWangIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "其它"
    rs.Open "select sum( 数量 ) from 产品入库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblOtherIn.Caption = "0"
    Else
        lblOtherIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    
    productClass = "单片"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanPianOut.Caption = "0"
    Else
        lblDanPianOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "复合片"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblFuHeOut.Caption = "0"
    Else
        lblFuHeOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "轧花片"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblYaHuaOut.Caption = "0"
    Else
        lblYaHuaOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "淋膜制品"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblLinMoOut.Caption = "0"
    Else
        lblLinMoOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "定位包装"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDingWeiOut.Caption = "0"
    Else
        lblDingWeiOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "棒材"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblBangOut.Caption = "0"
    Else
        lblBangOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "管材"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblGuanOut.Caption = "0"
    Else
        lblGuanOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "网材"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblWangOut.Caption = "0"
    Else
        lblWangOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "其它"
    rs.Open "select sum( 数量 ) from 产品出库记录表 where 产品类型 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblOtherOut.Caption = "0"
    Else
        lblOtherOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 单片库存表"
    If IsNull(rs.Fields(0)) Then
        lblDanPianNow.Caption = "0"
    Else
        lblDanPianNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 复合片库存表"
    If IsNull(rs.Fields(0)) Then
        lblFuHeNow.Caption = "0"
    Else
        lblFuHeNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 轧花片库存表"
    If IsNull(rs.Fields(0)) Then
        lblYaHuaNow.Caption = "0"
    Else
        lblYaHuaNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 淋膜制品库存表"
    If IsNull(rs.Fields(0)) Then
        lblLinMoNow.Caption = "0"
    Else
        lblLinMoNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 定位包装库存表"
    If IsNull(rs.Fields(0)) Then
        lblDingWeiNow.Caption = "0"
    Else
        lblDingWeiNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 棒库存表"
    If IsNull(rs.Fields(0)) Then
        lblBangNow.Caption = "0"
    Else
        lblBangNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 管库存表"
    If IsNull(rs.Fields(0)) Then
        lblGuanNow.Caption = "0"
    Else
        lblGuanNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 网库存表"
    If IsNull(rs.Fields(0)) Then
        lblWangNow.Caption = "0"
    Else
        lblWangNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 其它产品库存表"
    If IsNull(rs.Fields(0)) Then
        lblOtherNow.Caption = "0"
    Else
        lblOtherNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "低压膜"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDiYaIn.Caption = "0"
    Else
        lblDiYaIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "高压膜"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblGaoYaIn.Caption = "0"
    Else
        lblGaoYaIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "彩印膜"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblCaiYinIn.Caption = "0"
    Else
        lblCaiYinIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "滑石料"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblHuaShiLiaoIn.Caption = "0"
    Else
        lblHuaShiLiaoIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "聚乙烯"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblJuYiXiIn.Caption = "0"
    Else
        lblJuYiXiIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "回料"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblHuiLiaoIn.Caption = "0"
    Else
        lblHuiLiaoIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "氮气"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanQiIn.Caption = "0"
    Else
        lblDanQiIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "氧气"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblYangQiIn.Caption = "0"
    Else
        lblYangQiIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "纸管"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblZhiGuanIn.Caption = "0"
    Else
        lblZhiGuanIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "丁烷"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDingWanIn.Caption = "0"
    Else
        lblDingWanIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "单甘脂"
    rs.Open "select sum( 数量 ) from 原料入库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanGanZhiIn.Caption = "0"
    Else
        lblDanGanZhiIn.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "低压膜"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDiYaOut.Caption = "0"
    Else
        lblDiYaOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "高压膜"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblGaoYaOut.Caption = "0"
    Else
        lblGaoYaOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "彩印膜"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblCaiYinOut.Caption = "0"
    Else
        lblCaiYinOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "滑石料"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblHuaShiLiaoOut.Caption = "0"
    Else
        lblHuaShiLiaoOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "聚乙烯"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblJuYiXiOut.Caption = "0"
    Else
        lblJuYiXiOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "回料"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblHuiLiaoOut.Caption = "0"
    Else
        lblHuiLiaoOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "氮气"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanQiOut.Caption = "0"
    Else
        lblDanQiOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "氧气"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblYangQiOut.Caption = "0"
    Else
        lblYangQiOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "纸管"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblZhiGuanOut.Caption = "0"
    Else
        lblZhiGuanOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "丁烷"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDingWanOut.Caption = "0"
    Else
        lblDingWanOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    productClass = "单甘脂"
    rs.Open "select sum( 数量 ) from 原料出库记录表 where 原料名称 = '" & productClass & "' and 日期 >= " + "#" + startT + "# and 日期 <= " + "#" + endT + "#"
    If IsNull(rs.Fields(0)) Then
        lblDanGanZhiOut.Caption = "0"
    Else
        lblDanGanZhiOut.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 低压膜库存表"
    If IsNull(rs.Fields(0)) Then
        lblDiYaNow.Caption = "0"
    Else
        lblDiYaNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 高压膜库存表"
    If IsNull(rs.Fields(0)) Then
        lblGaoYaNow.Caption = "0"
    Else
        lblGaoYaNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select sum( 数量 ) from 彩印膜库存表"
    If IsNull(rs.Fields(0)) Then
        lblCaiYinNow.Caption = "0"
    Else
        lblCaiYinNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 滑石料"
    If IsNull(rs.Fields(0)) Then
        lblHuaShiLiaoNow.Caption = "0"
    Else
        lblHuaShiLiaoNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 聚乙烯"
    If IsNull(rs.Fields(0)) Then
        lblJuYiXiNow.Caption = "0"
    Else
        lblJuYiXiNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 回料"
    If IsNull(rs.Fields(0)) Then
        lblHuiLiaoNow.Caption = "0"
    Else
        lblHuiLiaoNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 氮气"
    If IsNull(rs.Fields(0)) Then
        lblDanQiNow.Caption = "0"
    Else
        lblDanQiNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 氧气"
    If IsNull(rs.Fields(0)) Then
        lblYangQiNow.Caption = "0"
    Else
        lblYangQiNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 丁烷"
    If IsNull(rs.Fields(0)) Then
        lblDingWanNow.Caption = "0"
    Else
        lblDingWanNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    rs.Open "select 数量 from 其它原料库存表 where 名称 = 单甘脂"
    If IsNull(rs.Fields(0)) Then
        lblDanGanZhiNow.Caption = "0"
    Else
        lblDanGanZhiNow.Caption = Str(rs.Fields(0))
    End If
    rs.Close
    
    cn.Close
    
    
End Sub

Private Sub Form_Load()
    开始日期.Year = Year(Date)
    开始日期.Month = Month(Date)
    开始日期.Day = Day(Date)
    截止日期.Year = Year(Date)
    截止日期.Month = Month(Date)
    截止日期.Day = Day(Date)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -