📄 人事管理-员工信息查询.frm
字号:
VERSION 5.00
Begin VB.Form Form29
Caption = "人事管理-员工信息查询"
ClientHeight = 8595
ClientLeft = 165
ClientTop = 450
ClientWidth = 8865
LinkTopic = "Form29"
ScaleHeight = 8595
ScaleWidth = 8865
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 = 510
Index = 0
Left = 3480
TabIndex = 18
Top = 960
Width = 2775
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 = 3480
List = "人事管理-员工信息查询.frx":0016
TabIndex = 4
Text = "请选择"
Top = 480
Width = 2775
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 510
Index = 1
Left = 2400
TabIndex = 3
Top = 2160
Width = 1215
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
Left = 2040
TabIndex = 2
Top = 7920
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 = 5400
TabIndex = 1
Top = 7920
Width = 1215
End
Begin VB.Frame Frame1
Caption = "信息显示"
Height = 6135
Left = 720
TabIndex = 0
Top = 1680
Width = 7695
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2175
Index = 7
Left = 1920
TabIndex = 20
Top = 3480
Width = 4695
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 510
Index = 6
Left = 5400
TabIndex = 19
Top = 2400
Width = 1215
End
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
Index = 5
Left = 1680
TabIndex = 10
Top = 2520
Width = 1215
End
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
Index = 4
Left = 5400
TabIndex = 9
Top = 1440
Width = 1215
End
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
Index = 3
Left = 1680
TabIndex = 8
Top = 1440
Width = 1215
End
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
Index = 2
Left = 5400
TabIndex = 7
Top = 600
Width = 1215
End
Begin VB.Label Label7
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 = 4080
TabIndex = 17
Top = 2520
Width = 1200
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 = 1
Left = 240
TabIndex = 16
Top = 3600
Width = 1680
End
Begin VB.Label Label6
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 = 360
TabIndex = 15
Top = 2640
Width = 1200
End
Begin VB.Label Label5
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 = 4080
TabIndex = 14
Top = 1560
Width = 1200
End
Begin VB.Label Label4
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 = 360
TabIndex = 13
Top = 1560
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
Left = 4080
TabIndex = 12
Top = 600
Width = 1200
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
Index = 1
Left = 360
TabIndex = 11
Top = 600
Width = 1200
End
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 = 1200
TabIndex = 6
Top = 480
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
Index = 0
Left = 1200
TabIndex = 5
Top = 1080
Width = 2160
End
End
Attribute VB_Name = "Form29"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim db As Database, rs As Recordset, i, j, a As Long, sql As String
Set db = OpenDatabase(App.Path + "/系统数据库.mdb")
Set rs = db.OpenRecordset("人事管理信息", dbOpenTable)
j = rs.RecordCount
If Text1(0).Text = "" Then
MsgBox "查询条件不能为空,请重新输入!", vbOKOnly + vbCritical, "信息提示"
Text1(0).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 6
If Combo1.Text = rs.Fields(a).Name Then
If rs.EOF And i = j Then
MsgBox "未找到记录!", vbOKOnly + vbInformation, "提示"
Text1(0).SetFocus
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(3).Text = ""
Text1(4).Text = ""
Text1(5).Text = ""
Text1(6).Text = ""
Text1(7).Text = ""
Exit Sub
End If
If rs.Fields(a).Value = Text1(0).Text Then
Text1(1).Text = rs.Fields(0).Value
Text1(2).Text = rs.Fields(1).Value
Text1(3).Text = rs.Fields(2).Value
Text1(4).Text = rs.Fields(3).Value
Text1(5).Text = rs.Fields(4).Value
Text1(6).Text = rs.Fields(5).Value
Text1(7).Text = rs.Fields(6).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 + -