?? f_yuangongjibenxinxi.frm
字號:
Caption = "籍貫:"
Height = 255
Index = 57
Left = 120
TabIndex = 75
Top = 1320
Width = 735
End
Begin VB.Label lblLabels
Caption = "出生地點:"
Height = 255
Index = 58
Left = 3120
TabIndex = 74
Top = 1320
Width = 975
End
Begin VB.Label lblLabels
Caption = "戶口所在地:"
Height = 255
Index = 59
Left = 6000
TabIndex = 73
Top = 1320
Width = 975
End
Begin VB.Label lblLabels
Caption = "進入公司時間:"
Height = 255
Index = 19
Left = 6000
TabIndex = 72
Top = 6000
Width = 1095
End
Begin VB.Label lblLabels
Caption = "轉正時間:"
Height = 255
Index = 20
Left = 3120
TabIndex = 71
Top = 6360
Width = 1095
End
Begin VB.Label lblLabels
Caption = "用工類型:"
Height = 255
Index = 23
Left = 6000
TabIndex = 70
Top = 6360
Width = 975
End
Begin VB.Label lblLabels
Caption = "檔案轉入時間:"
Height = 255
Index = 24
Left = 120
TabIndex = 69
Top = 6360
Width = 1215
End
Begin VB.Label lblLabels
Caption = "招收類型:"
Height = 255
Index = 26
Left = 120
TabIndex = 68
Top = 6720
Width = 1095
End
Begin VB.Label lblLabels
Caption = "人員類型一級:"
Height = 255
Index = 27
Left = 3120
TabIndex = 67
Top = 6720
Width = 1335
End
Begin VB.Label lblLabels
Caption = "人員類型二級:"
Height = 255
Index = 28
Left = 6000
TabIndex = 66
Top = 6720
Width = 1215
End
Begin VB.Label lblLabels
Caption = "原任職單位:"
Height = 255
Index = 60
Left = 120
TabIndex = 65
Top = 6000
Width = 975
End
Begin VB.Label lblLabels
Caption = "原職務:"
Height = 255
Index = 61
Left = 3120
TabIndex = 64
Top = 6000
Width = 615
End
Begin VB.Label lblLabels
Caption = "身高:"
Height = 255
Index = 30
Left = 120
TabIndex = 63
Top = 600
Width = 975
End
Begin VB.Label lblLabels
Caption = "體重:"
Height = 255
Index = 31
Left = 3120
TabIndex = 62
Top = 600
Width = 615
End
Begin VB.Label lblLabels
Caption = "血型:"
Height = 255
Index = 32
Left = 6000
TabIndex = 61
Top = 600
Width = 735
End
Begin VB.Label lblLabels
Caption = "健康情況:"
Height = 255
Index = 33
Left = 120
TabIndex = 60
Top = 960
Width = 975
End
Begin VB.Label lblLabels
Caption = "特長:"
Height = 255
Index = 62
Left = 120
TabIndex = 59
Top = 2760
Width = 615
End
Begin VB.Label lblLabels
Caption = "勞動力類型:"
Height = 255
Index = 29
Left = 120
TabIndex = 58
Top = 7080
Width = 975
End
End
End
End
Attribute VB_Name = "F_YuanGongJiBenXinXi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Private Sub Form_Load()
On Error Resume Next
For Each TextBox In Me.Controls
TextBox.Font.Name = "宋體"
TextBox.Font.Size = 9
Next
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select 員工號,姓名,性別,身高,體重,血型,健康情況,出生日期,民族,籍貫,出生地點,戶口所在地,政治面目,婚姻狀況,身份證號,學歷,所學專業,畢業學校,職稱,職稱評定時間,技術證書,特長,駕駛證號,準駕車輛,初次領證時間,有效期限,參加工作時間,家庭通訊地址,郵編,電話,傳呼機,移動電話,愛人姓名,愛人出生日期,愛人工作單位,愛人聯系電話,生育指標,計劃生育措施,獨生子女姓名,子女出生日期,子女性別,獨生子女費開始時間,獨生子女費結束時間,子女醫療包干開始時間,子女醫療包干結束時間,原任職單位,原職務,進入公司時間,轉正時間,用工類型,檔案轉入時間,轉入單位名稱,招收類型,人員類型一級,人員類型二級,勞動力類型 from 員工基本信息", db, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = adoPrimaryRS
SetButtons True
Set DTPicker1.DataSource = adoPrimaryRS
Set DTPicker2.DataSource = adoPrimaryRS
Set DTPicker3.DataSource = adoPrimaryRS
Set DTPicker4.DataSource = adoPrimaryRS
Set DTPicker5.DataSource = adoPrimaryRS
Set DTPicker6.DataSource = adoPrimaryRS
Set DTPicker7.DataSource = adoPrimaryRS
Set DTPicker8.DataSource = adoPrimaryRS
Set DTPicker9.DataSource = adoPrimaryRS
Set DTPicker10.DataSource = adoPrimaryRS
Set DTPicker11.DataSource = adoPrimaryRS
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
With adoPrimaryRS
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
mbAddNewFlag = True
SetButtons False
End With
Exit Sub
AddErr:
MsgBox "增加操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox "刪除操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
adoPrimaryRS.Requery
Exit Sub
RefreshErr:
MsgBox "刷新操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
mbEditFlag = True
SetButtons False
Exit Sub
EditErr:
MsgBox "更改操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdCancel_Click()
' On Error Resume Next
On Error GoTo CancelErr
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
adoPrimaryRS.MoveFirst
End If
SetButtons True
Exit Sub
CancelErr:
MsgBox "取消操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
Exit Sub
UpdateErr:
MsgBox "保存操作有錯誤", vbExclamation + vbOKOnly, pTitle
End Sub
Private Sub cmdClose_Click()
RSGL.Enabled = True
Unload Me
End Sub
Private Sub SetButtons(bVal As Boolean)
Dim oTEX As TextBox
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
If bVal Then
Set DataGrid1.DataSource = adoPrimaryRS
Else
Set DataGrid1.DataSource = Nothing
End If
For Each oText In Me.txtFields
oText.Enabled = Not bVal
Next
DTPicker1.Enabled = Not bVal
DTPicker2.Enabled = Not bVal
DTPicker3.Enabled = Not bVal
DTPicker4.Enabled = Not bVal
DTPicker5.Enabled = Not bVal
DTPicker6.Enabled = Not bVal
DTPicker7.Enabled = Not bVal
DTPicker8.Enabled = Not bVal
DTPicker9.Enabled = Not bVal
DTPicker10.Enabled = Not bVal
DTPicker11.Enabled = Not bVal
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
If Not IsNumeric(txtFields(30).Text) And (txtFields(30).Text <> "") Then
MsgBox "請在“身高”中輸入數字", vbExclamation + vbOKOnly, pTitle
txtFields(30).SetFocus
txtFields(30).SelLength = Len(txtFields(30))
txtFields(30).SelStart = 0
End If
If Not IsNumeric(txtFields(31).Text) And (txtFields(31).Text <> "") Then
MsgBox "請在“體重”中輸入數字", vbExclamation + vbOKOnly, pTitle
txtFields(31).SetFocus
txtFields(31).SelLength = Len(txtFields(31))
txtFields(31).SelStart = 0
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -