📄 storesum.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form storesum
BackColor = &H00C0C0C0&
Caption = "货物汇总"
ClientHeight = 8355
ClientLeft = 60
ClientTop = 345
ClientWidth = 15240
Icon = "storesum.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
Picture = "storesum.frx":08CA
ScaleHeight = 8355
ScaleWidth = 15240
WindowState = 2 'Maximized
Begin VB.CommandButton Command5
Caption = "按保质期查询"
Height = 495
Left = 8040
TabIndex = 10
Top = 3600
Width = 1455
End
Begin VB.CommandButton Command4
Caption = "按库存量查询"
Height = 495
Left = 7920
TabIndex = 9
Top = 1920
Width = 1695
End
Begin VB.TextBox Text3
DataField = "库存量"
Height = 495
Left = 7800
TabIndex = 8
Top = 1080
Width = 1815
End
Begin VB.TextBox Text2
DataField = "品名"
Height = 495
Left = 7920
TabIndex = 6
Top = 2760
Width = 1815
End
Begin VB.CommandButton Command3
Caption = "恢复原表"
Height = 495
Left = 3480
TabIndex = 3
Top = 4920
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "按保质期汇总"
Height = 495
Left = 1680
TabIndex = 2
Top = 4920
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "按库存量汇总"
Height = 495
Left = 0
TabIndex = 1
Top = 4920
Width = 1695
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\Administrator\桌面\11050302超市管理系统(033069,033068, 033067)\源代码\supermarket1.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 615
Left = 1320
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Storeinfo"
Top = 7560
Visible = 0 'False
Width = 3135
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "storesum.frx":44DE0
Height = 3735
Left = 120
TabIndex = 0
Top = 360
Width = 5175
_ExtentX = 9128
_ExtentY = 6588
_Version = 393216
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "输入库存量"
Height = 495
Left = 5880
TabIndex = 7
Top = 1200
Width = 1095
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "输入保质期/年-月-日"
Height = 495
Left = 5880
TabIndex = 5
Top = 2760
Width = 1935
End
Begin VB.Label Label1
Caption = "Label1"
Height = 15
Left = 6840
TabIndex = 4
Top = 6240
Width = 1935
End
End
Attribute VB_Name = "storesum"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs_sum As New ADODB.Recordset
Private Sub Command1_Click()
Data1.RecordSource = "select 库存量,count(*) as 物品数 from storeinfo group by 库存量"
Data1.Refresh
End Sub
Private Sub Command2_Click()
Data1.RecordSource = "select 保质期,count(*) as 物品数 from storeinfo group by 保质期"
Data1.Refresh
End Sub
Private Sub Command3_Click()
Data1.RecordSource = "storeinfo"
Data1.Refresh
End Sub
Private Sub Command4_Click()
Dim m As String
'm = InputBox$("请输入库存量", "查找窗")
m = Trim(Text3.Text)
Data1.RecordSource = "select * from storeinfo where 库存量= '" & m & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "无此数量货物!"
Data1.RecordSource = "storeinfo"
Data1.Refresh
End If
End Sub
Private Sub Command5_Click()
Dim m As String
'm = InputBox$("请输入保质期", "查找窗")
m = Trim(Text2.Text)
Data1.RecordSource = "select * from storeinfo where 保质期= '" & m & "'"
Data1.Refresh
If Data1.Recordset.EOF Then
MsgBox "此日无记录!"
Data1.RecordSource = "storeinfo"
Data1.Refresh
End If
End Sub
Private Sub Command6_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub Command7_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Command8_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command9_Click()
Data1.Recordset.MoveLast
End Sub
Private Sub Form_Load()
Data1.RecordSource = "storeinfo"
Data1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -