员工信息管理系统源代码系统功能模块图 第6页
Private Sub Command4_Click()
msg = InputBox("请输入该部门名称", "查找记录")
Data.recourdset.FindFirst "部门名称='" & msg & "'"
If Data1.Recordset.NoMatch Then
MsgBox "没有符合条件的部门信息"
Else
MsgBox "符合条件的部门为" & Data1.Recordset.Fields(1)
End If
End Sub
Private Sub Command5_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
MsgBox ("已经是第一条记录了!")
End If
End Sub
Private Sub Command6_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox ("已经是最后一条记录了!")
End If
End Sub
Private Sub Command7_Click()
Form1.Show
Form3.Hide
End Sub
Form4:
Public msg
Private Sub Command1_Click()
vb_msg = MsgBox("请输入新部门工资信息", vbOKCancel)
If vb_msg = vbCancel Then
Exit Sub
End If
Data1.Recordset.AddNew
Data1.Recordset.Fields("部门编号") = Text1.Text
Data1.Recordset.Fields("部门名称") = Text2.Text
Data1.Recordset.Fields("职务") = Text3.Text
Dada1.Recordset.Fields("月薪") = Text4.Text
Data1.Recordset.Update
End Sub
Private Sub Command1_Click()
vb_msg = MsgBox("请输入新部门工资信息", vbOKCancel)
If vb_msg = vbCancel Then
Exit Sub
End If
Data1.Recordset.AddNew
Data1.Recordset.Fields("部门编号") = Text1.Text
Data1.Recordset.Fields("部门名称") = Text2.Text
Data1.Recordset.Fields("职务") = Text3.Text
Dada1.Recordset.Fields("月薪") = Text4.Text
Data1.Recordset.Update
End Sub
Private Sub Command2_Click()
Dim areturn As Integer
areturn = MsgBox("你确实要删除该部门工资信息吗?", vbYesNo)
If areturn = vbYes Then
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End If
End Sub
Private Sub Command3_Click()
Dim areturn As Integer
areturn = MsgBox("你确实要修改该部门工资信息吗?", vbYesNo)
If areturn = vbYes Then
Data1.Recordset.Edit
Data1.Recordset.Fields("部门编号") = Text1.Text
Data1.Recordset.Fields("部门名称") = Text2.Text
Data1.Recordset.Fields("职务") = Text3.Text
Dada1.Recordset.Fields("月薪") = Text4.Text
Data1.Recordset.Update
End If
End Sub
Private Sub Command4_Click()
msg = InputBox("请输入该部门名称", "查找记录")
Data.recourdset.FindFirst "部门名称='" & msg & "'"
If Data1.Recordset.NoMatch Then
MsgBox "没有符合条件的工资信息"
Else
MsgBox "符合条件的部门为" & Data1.Recordset.Fields(1)
End If
End Sub
Private Sub Command5_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
MsgBox ("已经是第一条记录了!")
End If
End Sub
Private Sub Command6_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox ("已经是最后一条记录了!")
End If
End Sub
Private Sub Command7_Click()
Form1.Show
Form4.Hide
End Sub