| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 407 人关注过本帖
标题:求解释这代码的意思~
只看楼主 加入收藏
ttt96ttt
Rank: 2
等 级:论坛游民
帖 子:14
专家分:20
注 册:2013-5-21
结帖率:0
收藏
 问题点数:0 回复次数:0 
求解释这代码的意思~
Private Sub Command1_Click()
On Error Resume Next
 Dim Dat1, Dat2
  Dim Moncout1, Moncout2 As Single
  Dim Moncouts, Moncouts1, Moncouts2 As Single
'  Dim Moncout1J, Moncout2J
  Dim Id2, Id3, Id4, Id5 As Single
'  Dim MoncoutSJ, Moncouts1J, Moncouts2J
'  Dim zMoncoutsJ, zMoncouts1J, zMoncouts2J
'  Dim MoncoutJ, zMoncoutJ
  Dim ProID1, ProID2 As Single
  Dim OthenIn, OthenOut As Single
      Dim M As Long
    Dim Y As Long
    Dim d As Date
'    Dim CD1 As Date
'    Dim CD2 As Date
'    d = Text1.Text
    Y = Text1.Text
    M = Text2.Text + 1
    If M = 13 Then
        Dat2 = CDate(CStr(Y) & "-12-31")
    Else
        Dat2 = DateAdd("d", CDate(CStr(Y) & "-" & CStr(M) & "-1"), -1)
    End If
     Dat1 = CDate(Y & "-" & M - 1 & "-1")

  If adoCon.State = adStateClosed Then adoCon.Open
  Set adoRs.ActiveConnection = adoCon
  Set adoRs1.ActiveConnection = adoCon
  Set adoRs2.ActiveConnection = adoCon

  ProID1 = 1
  ProID2 = 2
  i = 1

  If Text3.Text = "" Then
    adoRs.Open "select * from SuKiMaterialStorage order by 产品编号"
  Else
  
   adoRs.Open "select * from SuKiMaterialStorage where 产品编号 like '" & Text3.Text & "%' order by 产品编号"
  End If
  
    Id2 = 0
    Id3 = 0
    Id4 = 0
    Id5 = 0
'    zMoncoutJ = 0
'    zMoncoutsJ = 0
'    zMoncouts1J = 0
'    zMoncouts2J = 0

ffff:

  Do While Not adoRs.EOF
   
   adoRs2.Open "select * from SuKiMaterialName where 编号='" & adoRs("产品编号") & "'"
   
   If Check1.Value = 1 And Check2.Value = 0 Then
     
     If adoRs2("属性") = 0 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
     
   End If
      
   If Check1.Value = 0 And Check2.Value = 1 Then
     
     If adoRs2("属性") = 1 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
     
   End If
      
'   If Check1.Value = 0 And Check2.Value = 1 Then
'
'     If adoRs2("属性") = 1 Then
'     Else
'       adoRs2.Close
'       adoRs.MoveNext
'       GoTo ffff:
'     End If
'
'   End If
 
 '''''''''''''''''''''''''''''''''''''''
  If Check3.Value = 1 And Option1.Value = True Then
  
     If adoRs2("所属仓库") = 1 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
      
  If Check3.Value = 1 And Option2.Value = True Then
  
     If adoRs2("所属仓库") = 2 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option3.Value = True Then
  
     If adoRs2("所属仓库") = 3 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option4.Value = True Then
  
     If adoRs2("所属仓库") = 4 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option5.Value = True Then
  
     If adoRs2("所属仓库") = 5 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option6.Value = True Then
  
     If adoRs2("所属仓库") = 6 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option7.Value = True Then
  
     If adoRs2("所属仓库") = 7 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
  
  If Check3.Value = 1 And Option8.Value = True Then
  
     If adoRs2("所属仓库") = 8 Then
     Else
       adoRs2.Close
       adoRs.MoveNext
       GoTo ffff:
     End If
  
  End If
      
 
   adoRs2.Close


If ProID1 <> ProID2 Then
    Moncout = 0
    Moncout1 = 0
    Moncout2 = 0
    Moncouts = 0
    Moncouts1 = 0
    Moncouts2 = 0
    OthenIn = 0
    OthenOut = 0
2013-06-05 14:45
快速回复:求解释这代码的意思~
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012033 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved