?? 人事檔案.frm
字號(hào):
Top = 1440
Width = 1215
End
Begin VB.Label Label2
BackColor = &H80000000&
BackStyle = 0 'Transparent
Caption = "部 門 :"
ForeColor = &H00FFFFFF&
Height = 255
Left = 4440
TabIndex = 2
Top = 1440
Width = 975
End
Begin VB.Label Label1
BackColor = &H80000000&
BackStyle = 0 'Transparent
Caption = "職工編號(hào):"
ForeColor = &H00FFFFFF&
Height = 255
Left = 360
TabIndex = 1
Top = 1440
Width = 1095
End
Begin VB.Menu mnufile
Caption = "文件(&F)"
Begin VB.Menu mnuopen
Caption = "打開數(shù)據(jù)庫(&O)"
Enabled = 0 'False
Shortcut = ^O
End
Begin VB.Menu mnuclose
Caption = "關(guān)閉數(shù)據(jù)庫(&E)"
Shortcut = ^E
End
Begin VB.Menu mnubl
Caption = "-"
End
Begin VB.Menu mnuquit
Caption = "返回(&Q)"
Shortcut = ^Q
End
End
Begin VB.Menu mnuedit
Caption = "編輯(&E)"
Begin VB.Menu mnunew
Caption = "添加記錄(&N)"
Shortcut = ^N
End
Begin VB.Menu mnudel
Caption = "刪除記錄(&D)"
Shortcut = ^D
End
Begin VB.Menu mnumodify
Caption = "修改記錄(&M)"
Shortcut = ^M
End
Begin VB.Menu mnublk
Caption = "-"
End
Begin VB.Menu mnureport
Caption = "清空數(shù)據(jù)庫(&B)"
Shortcut = ^B
End
End
Begin VB.Menu mnulook
Caption = "查詢(&S)"
Begin VB.Menu mnucommon
Caption = "普通查詢(&P)"
Begin VB.Menu mnuenable
Caption = "啟動(dòng)查詢器"
End
Begin VB.Menu mnudisble
Caption = "關(guān)閉查詢器"
End
End
End
Begin VB.Menu munsetup
Caption = "預(yù)警(&A)"
Begin VB.Menu mnualert
Caption = " 合同到期預(yù)警(&A)"
Shortcut = ^S
End
End
Begin VB.Menu mnuhel
Caption = "幫助(&H)"
Begin VB.Menu mnuhelp
Caption = "幫助主題(&H)"
Shortcut = ^H
End
Begin VB.Menu mnur
Caption = "用戶注冊(cè)(&R)"
Shortcut = ^R
End
Begin VB.Menu menblk
Caption = "-"
End
Begin VB.Menu mnuabout
Caption = "關(guān)于(&A)"
Shortcut = ^A
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
Const myflag = &H800&
Dim add, alert As Integer
Private Sub aa()
Command13.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command12.Enabled = True
Command10.Enabled = False
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
Text7.Locked = False
Text8.Locked = False
Text9.Locked = False
Text10.Locked = False
Text11.Locked = False
Combo8.Locked = False
Text13.Locked = False
Text14.Locked = False
Text15.Locked = False
Text16.Locked = False
Text2.Locked = False
Text17.Locked = True
Option1.Enabled = True
Option2.Enabled = True
Image4.Enabled = True
Image5.Enabled = True
Combo1.Locked = False
Combo2.Locked = False
Combo3.Locked = False
Combo4.Locked = False
Image1.Enabled = True
mnunew.Enabled = False
mnudel.Enabled = False
mnumodify.Enabled = False
mnualert.Enabled = False
Command10.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
End Sub
Private Sub Combo6_Click()
Select Case Combo6.Text
Case "生產(chǎn)部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "職員"
Combo7.Text = Combo7.List(0)
Case "財(cái)務(wù)部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "出納"
Combo7.AddItem "會(huì)計(jì)"
Combo7.Text = Combo7.List(0)
Case "營業(yè)部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "外勤"
Combo7.AddItem "職員"
Combo7.Text = Combo7.List(0)
Case "工程部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "技術(shù)員"
Combo7.Text = Combo7.List(0)
Case "人事部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "文秘"
Combo7.AddItem "職員"
Combo7.Text = Combo7.List(0)
Case "總務(wù)部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "職員"
Combo7.Text = Combo7.List(0)
Case "保安部"
Combo7.Clear
Combo7.AddItem "經(jīng)理"
Combo7.AddItem "主管"
Combo7.AddItem "班長"
Combo7.AddItem "保安"
Combo7.Text = Combo7.List(0)
Case "工會(huì)"
Combo7.Clear
Combo7.AddItem "主席"
Combo7.AddItem "職員"
Combo7.Text = Combo7.List(0)
Case "總經(jīng)理室"
Combo7.Clear
Combo7.AddItem "總經(jīng)理"
Combo7.AddItem "秘書"
Combo7.Text = Combo7.List(0)
End Select
End Sub
Private Sub Command12_Click()
Dim oldmark
Dim a As String, b As String, c As String, d As String, e As Integer, f As Integer
Dim g As String, h As String
Dim o(1 To 20) As String
g = Combo6.Text
h = Combo7.Text
Image2.Picture = Image1.Picture
o(1) = Text4.Text
o(2) = Text5.Text
o(3) = Text6.Text
o(4) = Text7.Text
o(5) = Text8.Text
o(6) = Text9.Text
o(7) = Text10.Text
o(8) = Text11.Text
o(9) = Combo8.Text
o(10) = Text13.Text
o(11) = Text14.Text
o(12) = Text15.Text
o(13) = Text16.Text
o(19) = Text2.Text
o(15) = Combo1.Text
o(16) = Combo2.Text
o(17) = Combo3.Text
o(18) = Combo4.Text
If Option1.Value = True Then
o(14) = "男"
Else
o(14) = "女"
End If
If Combo6.Text = "" Or Combo7.Text = "" Then
Text1.SetFocus
Exit Sub
End If
If add = 1 Then
Data1.Recordset.CancelUpdate
End If
a = "0"
b = "0"
c = "0"
d = "0"
e = 100
f = "0"
If g = "生產(chǎn)部" Then
a = "SC"
End If
If g = "財(cái)務(wù)部" Then
a = "CW"
End If
If g = "營業(yè)部" Then
a = "YY"
End If
If g = "工程部" Then
a = "GC"
End If
If g = "人事部" Then
a = "RS"
End If
If g = "總務(wù)部" Then
a = "ZW"
End If
If g = "保安部" Then
a = "BA"
End If
If g = "工會(huì)" Then
a = "GH"
End If
If g = "總經(jīng)理室" Then
a = "JL"
End If
If Data1.Recordset.RecordCount = 0 Then
Else
oldmark = Data1.Recordset.Bookmark
End If
If h = "經(jīng)理" Then
c = "職務(wù) like '" & h & "' and 部門 like '" & g & "'"
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
f = 1
Else
MsgBox "此職工編號(hào)以存在", vbOKOnly, "提示信息"
Data1.Recordset.Bookmark = oldmark
Combo7.SetFocus
If add = 1 Then
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command12.Enabled = True
Data1.Recordset.AddNew
Data3.Recordset.AddNew
Combo6.Text = g
Combo7.Text = h
Text4.Text = o(1)
Text5.Text = o(2)
Text6.Text = o(3)
Text7.Text = o(4)
Text8.Text = o(5)
Text9.Text = o(6)
Text10.Text = o(7)
Text11.Text = o(8)
Combo8.Text = o(9)
Text13.Text = o(10)
Text14.Text = o(11)
Text15.Text = o(12)
Text16.Text = o(13)
Combo1.Text = o(15)
Combo2.Text = o(16)
Combo3.Text = o(17)
Combo4.Text = o(18)
Text2.Text = o(19)
Image1.Picture = Image2.Picture
If o(14) = "男" Then
Option1.Value = True
Image4.Picture = Image6.Picture
Image5.Picture = Image7.Picture
Else
Option2.Value = True
Image5.Picture = Image6.Picture
Image4.Picture = Image7.Picture
End If
Command10.Enabled = False
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
Text7.Locked = False
Text8.Locked = False
Text9.Locked = False
Text10.Locked = False
Text11.Locked = False
Combo8.Locked = False
Text13.Locked = False
Text14.Locked = False
Text15.Locked = False
Text16.Locked = False
Text2.Locked = False
Text17.Locked = True
Option1.Enabled = True
Option2.Enabled = True
Image4.Enabled = True
Image5.Enabled = True
Combo1.Locked = False
Combo2.Locked = False
Combo3.Locked = False
Combo4.Locked = False
Image1.Enabled = True
Text1.SetFocus
mnunew.Enabled = False
mnudel.Enabled = False
mnumodify.Enabled = False
mnualert.Enabled = False
Command10.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Label27.Caption = "<添加記錄>"
Label25.Caption = "記錄總數(shù)共<" & Data1.Recordset.RecordCount + 1 & ">條"
Label26.Caption = "第<" & Data1.Recordset.RecordCount + 1 & ">條記錄"
End If
If add = 0 Then
Data1.Recordset.Edit
Combo6.Text = g
Combo7.Text = h
Text1.Text = d
Text4.Text = o(1)
Text5.Text = o(2)
Text6.Text = o(3)
Text7.Text = o(4)
Text8.Text = o(5)
Text9.Text = o(6)
Text10.Text = o(7)
Text11.Text = o(8)
Combo8.Text = o(9)
Text13.Text = o(10)
Text14.Text = o(11)
Text15.Text = o(12)
Text16.Text = o(13)
Text2.Text = o(19)
Combo1.Text = o(15)
Combo2.Text = o(16)
Combo3.Text = o(17)
Combo4.Text = o(18)
Image1.Picture = Image2.Picture
If o(14) = "男" Then
Option1.Value = True
Image4.Picture = Image6.Picture
Image5.Picture = Image7.Picture
Else
Option2.Value = True
Image5.Picture = Image6.Picture
Image4.Picture = Image7.Picture
End If
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command10.Enabled = False
Command12.Enabled = True
Text1.Locked = False
Combo6.Locked = False
Combo7.Locked = False
Text4.Locked = False
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -