【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:monthcount.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form Form3
Caption = "盘点信息浏览"
ClientHeight = 6480
ClientLeft = 2520
ClientTop = 2025
ClientWidth = 6975
LinkTopic = "Form3"
ScaleHeight = 6480
ScaleWidth = 6975
Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1
Height = 5655
Left = 120
TabIndex = 0
Top = 720
Width = 6735
_ExtentX = 11880
_ExtentY = 9975
_Version = 393216
_NumberOfBands = 1
_Band(0).Cols = 2
End
Begin VB.Label title
AutoSize = -1 'True
Caption = "每月盘点"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 2760
TabIndex = 1
Top = 240
Width = 1140
End
End
Attribute
VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private rd As New ADODB.Recordset
Private re As New ADODB.Recordset
Private rh As New ADODB.Recordset
Dim time1 As String
Dim time2 As String
Dim time3 As String
Dim temp7 As String
Dim temp8 As String
Dim temp9 As Integer
Dim temp10 As String
Private Sub Form_Load()
MSHFlexGrid1.Clear
MSHFlexGrid1.Cols = 5
MSHFlexGrid1.Rows = 50
MSHFlexGrid1.ColWidth(0) = 900
MSHFlexGrid1.ColWidth(1) = 1100
MSHFlexGrid1.ColWidth(2) = 2000
MSHFlexGrid1.ColWidth(3) = 900
MSHFlexGrid1.ColWidth(4) = 1200
MSHFlexGrid1.TextMatrix(0, 0) = "序号"
MSHFlexGrid1.TextMatrix(0, 1) = "商品编码"
MSHFlexGrid1.TextMatrix(0, 2) = "商品名称"
MSHFlexGrid1.TextMatrix(0, 3) = "销售数量"
MSHFlexGrid1.TextMatrix(0, 4) = "销售年月日"
time3 = Year(Date)
time2 = Month(Date)
time1 = time3 & "-" & time2 & "%"
rh.Open "SELECT 商品编码,商品名称,销售数量,销售年月日 FROM 销售记录 where 销售年月日 like '" & time1 & " '", db, adOpenStatic, adLockOptimistic
re.Open "select count(*) as counter from 销售记录 where 销售年月日 like '" & time1 & " '", db, adOpenStatic, adLockOpti
mistic
counter = re("counter")
For i = 1 To counter
temp7 = rh("商品编码")
temp8 = rh("商品名称")
temp9 = rh("销售数量")
temp10 = rh("销售年月日")
MSHFlexGrid1.TextMatrix(i, 0) = i
MSHFlexGrid1.TextMatrix(i, 1) = temp7
MSHFlexGrid1.TextMatrix(i, 2) = temp8
MSHFlexGrid1.TextMatrix(i, 3) = temp9
MSHFlexGrid1.TextMatrix(i, 4) = temp10
rh.MoveNext
Next i
re.Close
rh.Close
Set rh = Nothing
End Sub