📄 原料管理-信息查询.frm
字号:
VERSION 5.00
Begin VB.Form Form13
Caption = "原料管理-信息查询"
ClientHeight = 6585
ClientLeft = 60
ClientTop = 345
ClientWidth = 10575
LinkTopic = "Form13"
ScaleHeight = 6585
ScaleWidth = 10575
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7920
TabIndex = 14
Top = 600
Width = 1935
End
Begin VB.Frame Frame1
Caption = "信息显示"
Height = 3615
Left = 960
TabIndex = 5
Top = 1680
Width = 8895
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 16
Top = 1920
Width = 2415
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 15
Top = 1200
Width = 2415
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2055
Left = 5760
TabIndex = 8
Top = 1200
Width = 2535
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 7
Top = 2640
Width = 2415
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2520
TabIndex = 6
Top = 480
Width = 2415
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原料数量:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 4
Left = 240
TabIndex = 13
Top = 2640
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "备 注:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 3
Left = 5880
TabIndex = 12
Top = 600
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原料价格:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 2
Left = 240
TabIndex = 11
Top = 1920
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原料名称:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 1
Left = 240
TabIndex = 10
Top = 1200
Width = 1200
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原料编号:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 0
Left = 240
TabIndex = 9
Top = 600
Width = 1200
End
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "原料管理-信息查询.frx":0000
Left = 3240
List = "原料管理-信息查询.frx":0010
TabIndex = 2
Text = "请选择"
Top = 720
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "开始查询"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 2640
TabIndex = 1
Top = 5760
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出查询"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7560
TabIndex = 0
Top = 5760
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请选择查询的类别:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 0
Left = 840
TabIndex = 4
Top = 720
Width = 2160
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "请输入查询的条件:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 5520
TabIndex = 3
Top = 720
Width = 2160
End
End
Attribute VB_Name = "Form13"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
Dim db As Database, rs As Recordset, i, j, a As Long
Set db = OpenDatabase(App.Path + "/系统数据库.mdb")
Set rs = db.OpenRecordset("原料管理信息", dbOpenTable)
j = rs.RecordCount + 1
If Text1.Text = "" Then
MsgBox "查询条件不能为空,请重新输入!", vbOKOnly + vbCritical, "信息提示"
Text1.SetFocus
Else
If j = 0 Then
MsgBox "无当前记录!", vbCritical + vbOKOnly, "提示"
Me.Hide
Form2.Show
Else
rs.MoveFirst
For i = 0 To j
For a = 0 To 4
If Combo1.Text = rs.Fields(a).Name Then
If i = j Then
MsgBox "未找到记录!", vbOKOnly + vbInformation, "提示"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Exit Sub
End If
If rs.Fields(a).Value = Text1.Text Then
Text2.Text = rs.Fields(0).Value
Text3.Text = rs.Fields(1).Value
Text4.Text = rs.Fields(2).Value
Text5.Text = rs.Fields(3).Value
Text6.Text = rs.Fields(4).Value
MsgBox "信息已找到!", vbOKOnly + vbInformation, "恭喜"
Me.Hide
Form2.Show
Exit Sub
Else
End If
End If
Next a
rs.MoveNext
Next i
End If
End If
End Sub
Private Sub Command2_Click()
Me.Hide
Form2.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -