📄 main_kcgl_kccx.frm
字号:
VERSION 5.00
Begin VB.Form main_kcgl_kccx
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "库存管理——【库存查询】"
ClientHeight = 4425
ClientLeft = 315
ClientTop = 2400
ClientWidth = 10170
Icon = "main_kcgl_kccx.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4425
ScaleWidth = 10170
StartUpPosition = 1 '所有者中心
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "yyjxc.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "kc"
Top = 915
Visible = 0 'False
Width = 1140
End
Begin VB.Frame Frame1
Caption = "请选择查询条件"
Height = 630
Left = 45
TabIndex = 4
Top = 60
Width = 6270
Begin VB.TextBox Text1
BackColor = &H80000000&
Height = 300
Left = 2085
TabIndex = 6
Top = 210
Width = 4125
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "main_kcgl_kccx.frx":000C
Left = 120
List = "main_kcgl_kccx.frx":000E
Style = 2 'Dropdown List
TabIndex = 5
Top = 210
Width = 1965
End
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 435
Left = 6375
TabIndex = 2
Top = 195
Width = 1245
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 435
Left = 8880
TabIndex = 1
Top = 195
Width = 1245
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 435
Left = 7620
TabIndex = 0
Top = 195
Width = 1245
End
Begin VB.PictureBox DBGrid1
Height = 3615
Left = 30
ScaleHeight = 3555
ScaleWidth = 10005
TabIndex = 3
Top = 735
Width = 10065
End
End
Attribute VB_Name = "main_kcgl_kccx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
' 向combo1添加查询项目列表
Combo1.AddItem ("商品名称")
Combo1.AddItem ("简称")
Combo1.AddItem ("批号")
Combo1.ListIndex = 0
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\yyjxc.mdb" '自动识别数据库路径
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Command1_Click()
'查询库存信息
Data1.RecordSource = "select * from kc where (kc." & Combo1.Text & " " & "like " + Chr(34) + Text1.Text + "*" + Chr(34) + ")"
Data1.Refresh
End Sub
Private Sub Command2_Click() '删除库存信息
On Error Resume Next
Data1.Recordset.Delete
Data1.Refresh
Data2.Refresh
End Sub
Private Sub Command3_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -