⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frminquire.frm

📁 用VB+Access实现的企业人事工资管理系统。
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      End
      Begin VB.Label Label10 
         Caption         =   "计发时间:"
         Height          =   375
         Left            =   3600
         TabIndex        =   22
         Top             =   3720
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "实发工资:"
         ForeColor       =   &H000000C0&
         Height          =   495
         Left            =   480
         TabIndex        =   20
         Top             =   3720
         Width           =   1335
      End
      Begin VB.Label Label8 
         Caption         =   "所得税:"
         Height          =   495
         Left            =   3600
         TabIndex        =   18
         Top             =   3120
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "税前小计:"
         Height          =   375
         Left            =   480
         TabIndex        =   16
         Top             =   3120
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "医疗保险:"
         Height          =   375
         Left            =   3600
         TabIndex        =   14
         Top             =   2500
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "公积金:"
         Height          =   375
         Left            =   480
         TabIndex        =   12
         Top             =   2500
         Width           =   735
      End
      Begin VB.Label label5 
         Caption         =   "工资小计:"
         Height          =   375
         Left            =   3600
         TabIndex        =   10
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "奖金:"
         Height          =   255
         Left            =   3600
         TabIndex        =   8
         Top             =   1320
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "底薪:"
         Height          =   375
         Left            =   480
         TabIndex        =   6
         Top             =   1920
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询方式选择"
      Height          =   2295
      Left            =   480
      TabIndex        =   0
      Top             =   5400
      Width           =   7695
      Begin VB.OptionButton OptionID 
         Caption         =   "编号:"
         Height          =   375
         Left            =   2520
         TabIndex        =   32
         Top             =   600
         Width           =   975
      End
      Begin VB.OptionButton OptionName 
         Caption         =   "姓名:"
         Height          =   375
         Left            =   120
         TabIndex        =   31
         Top             =   600
         Value           =   -1  'True
         Width           =   975
      End
      Begin VB.CheckBox CheckBranch 
         Caption         =   "部门:"
         Height          =   375
         Left            =   5160
         TabIndex        =   30
         Top             =   600
         Width           =   975
      End
      Begin VB.ComboBox ComboBranch 
         Height          =   300
         ItemData        =   "frmInquire.frx":0000
         Left            =   6120
         List            =   "frmInquire.frx":0025
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   600
         Width           =   1335
      End
      Begin VB.ComboBox ComboName 
         Height          =   300
         ItemData        =   "frmInquire.frx":0089
         Left            =   1080
         List            =   "frmInquire.frx":008B
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   600
         Width           =   1215
      End
      Begin VB.ComboBox ComboID 
         Height          =   300
         ItemData        =   "frmInquire.frx":008D
         Left            =   3480
         List            =   "frmInquire.frx":008F
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   600
         Width           =   1215
      End
      Begin VB.CommandButton cmdExit 
         Caption         =   "退出查询"
         Height          =   615
         Left            =   2880
         TabIndex        =   4
         Top             =   1320
         Width           =   1815
      End
   End
End
Attribute VB_Name = "frmInquire"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'为组合框添加员工姓名列表
Private Sub addNameList()
Adodc1.Recordset.MoveFirst
While (Not Adodc1.Recordset.EOF)
    ComboName.AddItem Adodc1.Recordset("姓名")
    Adodc1.Recordset.MoveNext
Wend
End Sub
'为组合框添加编号列表
Private Sub addIDList()
Adodc1.Recordset.MoveFirst
While (Not Adodc1.Recordset.EOF)
    ComboID.AddItem Adodc1.Recordset("编号")
    Adodc1.Recordset.MoveNext
Wend
End Sub
'确定相应的员工姓名
Private Sub fixName()
Dim ID As Integer
ID = ComboID.Text
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find "编号=" & ID
ComboName.Text = Adodc1.Recordset("姓名")
End Sub
'确定相应的员工编号
Private Sub fixID()
Dim name As String
name = ComboName.Text
name = "'" & name & "'"
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find "姓名=" & name
ComboID.Text = Adodc1.Recordset("编号")
End Sub
'复选框信息改变
Private Sub CheckBranch_Click()
If CheckBranch.Value = False Then
    ComboID.Clear
    addIDList
    ComboName.Clear
    addNameList
End If
If CheckBranch.Value Then
    addNameAgain
    addIDAgain
End If
End Sub
'部门组合框信息改变
Private Sub ComboBranch_Click()
If CheckBranch.Value Then
    addNameAgain
    addIDAgain
End If
End Sub
'编号组合框信息改变
Private Sub ComboID_Click()
If OptionID.Value Then
    fixName
End If
End Sub
'姓名组合框信息改变
Private Sub ComboName_Click()
If OptionName.Value Then
    fixID
End If
End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub
'初始化组合框控件列表
Private Sub Form_Load()
addNameList
addIDList
End Sub
'重新添加姓名列表
Private Sub addNameAgain()
ComboName.Clear
Adodc1.Recordset.MoveFirst
While (Not Adodc1.Recordset.EOF)
    If Adodc1.Recordset("部门") = ComboBranch.Text Then
        ComboName.AddItem Adodc1.Recordset("姓名")
    End If
    Adodc1.Recordset.MoveNext
Wend
End Sub
'重新添加编号列表
Private Sub addIDAgain()
ComboID.Clear
Adodc1.Recordset.MoveFirst
While (Not Adodc1.Recordset.EOF)
    If Adodc1.Recordset("部门") = ComboBranch.Text Then
        ComboID.AddItem Adodc1.Recordset("编号")
    End If
    Adodc1.Recordset.MoveNext
Wend
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -