求解释这代码的意思~
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