📄 员工查询.frm
字号:
VERSION 5.00
Begin VB.Form yuangongchaxun
Caption = "员工查询"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdBegin
Caption = "查 询"
Height = 375
Left = 2640
TabIndex = 4
Top = 1920
Width = 975
End
Begin VB.CommandButton cmdEnd
Caption = "取 消"
Height = 375
Left = 1200
TabIndex = 5
Top = 1920
Width = 975
End
Begin VB.ComboBox TheField
Height = 300
Left = 2160
Style = 2 'Dropdown List
TabIndex = 2
Top = 720
Width = 1455
End
Begin VB.TextBox TheWord
Height = 270
Left = 2160
TabIndex = 3
Top = 1320
Width = 1455
End
Begin VB.Label lblWhereField
Caption = "查询条件:"
Height = 255
Left = 1200
TabIndex = 0
Top = 720
Width = 975
End
Begin VB.Label lblKeywords
Caption = "关 键 字:"
Height = 255
Left = 1200
TabIndex = 1
Top = 1320
Width = 975
End
End
Attribute VB_Name = "yuangongchaxun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdBegin_Click()
If TheField.Text = "姓名" And Trim(TheWord.Text) = "" Then
MsgBox "请输入要查询的员工姓名!", vbOKOnly + vbInformation, App.Title
TheWord.SetFocus
Exit Sub
End If
If TheField.Text = "编号" And IsNumeric(Trim(TheWord.Text)) = False Then
MsgBox "员工编号只能输入数字!", vbOKOnly + vbInformation, App.Title
TheWord.SetFocus
TheWord.SelStart = 0
TheWord.SelLength = Len(TheWord.Text)
Exit Sub
End If
If Trim(TheWord.Text) <> "" Then
WhereField = TheField.Text
Keywords = TheWord.Text
Unload Me
End If
End Sub
Private Sub cmdEnd_Click()
WhereField = ""
Keywords = ""
Unload Me
End Sub
Private Sub Form_Load()
Call CheckLogin(Me)
Call SetCenter(Me)
Call yuangongchaxunSet(Me)
TheField.AddItem "姓名"
TheField.AddItem "编号"
TheField.Text = "姓名"
End Sub
Private Sub TheField_Click()
If TheField.Text <> "" Then
SendKeys "{TAB}"
End If
End Sub
Private Sub TheWord_Change()
If Len(Trim(TheWord.Text)) > 0 Then
cmdBegin.Default = True
Else
cmdBegin.Default = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -