?? f_renyuanjibenxinxi.frm
字號:
Left = 6000
TabIndex = 71
Top = 600
Width = 735
End
Begin VB.Label lblLabels
Caption = "健康情況:"
Height = 255
Index = 33
Left = 120
TabIndex = 70
Top = 960
Width = 975
End
Begin VB.Label lblLabels
Caption = "特長:"
Height = 255
Index = 62
Left = 120
TabIndex = 69
Top = 2760
Width = 615
End
End
Begin VB.Frame Frame3
Height = 7695
Left = -74880
TabIndex = 10
Top = 360
Width = 8655
Begin MSDataGridLib.DataGrid DataGrid1
Height = 7335
Left = 120
TabIndex = 11
Top = 240
Width = 8415
_ExtentX = 14843
_ExtentY = 12938
_Version = 393216
HeadLines = 1
RowHeight = 14
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 2040
ScaleHeight = 300
ScaleWidth = 7080
TabIndex = 2
Top = 7440
Width = 7080
Begin VB.CommandButton CmdAdd
Caption = "增加"
Height = 300
Left = 1080
TabIndex = 9
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdEdit
Caption = "編輯"
Height = 300
Left = 2280
TabIndex = 8
Top = 0
Width = 1095
End
Begin VB.CommandButton CmdDelete
Caption = "刪除"
Height = 300
Left = 3480
TabIndex = 7
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新"
Height = 300
Left = 4680
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdClose
Caption = "關閉"
Height = 300
Left = 5880
TabIndex = 5
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
Caption = "保存"
Height = 300
Left = 4680
TabIndex = 4
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 300
Left = 5880
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 1095
End
End
End
End
End
Attribute VB_Name = "F_RenYuanJiBenXinXi"
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()
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 + -