F_RuZhiTongZhiShu.frm
资源名称:dbbase.rar [点击查看]
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:36k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
- Begin VB.Form F_RuZhiTongZhiShu
- BorderStyle = 3 'Fixed Dialog
- Caption = "入职通知书"
- ClientHeight = 7545
- ClientLeft = 1095
- ClientTop = 330
- ClientWidth = 10230
- ControlBox = 0 'False
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- Moveable = 0 'False
- ScaleHeight = 7545
- ScaleWidth = 10230
- StartUpPosition = 2 '屏幕中心
- Begin VB.Frame Frame1
- Height = 7455
- Left = 120
- TabIndex = 30
- Top = 0
- Width = 9975
- Begin TabDlg.SSTab SSTab1
- Height = 7095
- Left = 120
- TabIndex = 31
- Top = 240
- Width = 9615
- _ExtentX = 16960
- _ExtentY = 12515
- _Version = 393216
- Tabs = 2
- TabHeight = 520
- TabCaption(0) = "编 辑"
- TabPicture(0) = "F_RuZhiTongZhiShu.frx":0000
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame3"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).Control(1)= "Frame2"
- Tab(0).Control(1).Enabled= 0 'False
- Tab(0).Control(2)= "Frame4"
- Tab(0).Control(2).Enabled= 0 'False
- Tab(0).Control(3)= "Picture1"
- Tab(0).Control(3).Enabled= 0 'False
- Tab(0).ControlCount= 4
- TabCaption(1) = "列 表"
- TabPicture(1) = "F_RuZhiTongZhiShu.frx":001C
- Tab(1).ControlEnabled= 0 'False
- Tab(1).Control(0)= "Frame5"
- Tab(1).Control(0).Enabled= 0 'False
- Tab(1).ControlCount= 1
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 420
- Left = 2280
- ScaleHeight = 420
- ScaleWidth = 6720
- TabIndex = 62
- Top = 6600
- Width = 6720
- Begin Threed.SSCommand cmdClose
- Height = 330
- Left = 5520
- TabIndex = 63
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&Q.关闭"
- Font3D = 1
- End
- Begin Threed.SSCommand CmdAdd
- Height = 330
- Left = 720
- TabIndex = 25
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&A.增 加"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdEdit
- Height = 330
- Left = 1920
- TabIndex = 26
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&E.编 辑"
- Font3D = 1
- End
- Begin Threed.SSCommand CmdDelete
- Height = 330
- Left = 3120
- TabIndex = 27
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&D.删 除"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdUpdate
- Height = 330
- Left = 4320
- TabIndex = 64
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&Y.保存"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdRefresh
- Height = 330
- Left = 4320
- TabIndex = 28
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&R.刷 新"
- Font3D = 1
- End
- Begin Threed.SSCommand cmdCancel
- Height = 330
- Left = 5520
- TabIndex = 29
- Top = 0
- Width = 1095
- _Version = 65536
- _ExtentX = 1931
- _ExtentY = 573
- _StockProps = 78
- Caption = "&C.取 消"
- Font3D = 1
- End
- End
- Begin VB.Frame Frame5
- Height = 6135
- Left = -74760
- TabIndex = 56
- Top = 480
- Width = 9135
- Begin MSDataGridLib.DataGrid DataGrid1
- Height = 5775
- Left = 240
- TabIndex = 57
- Top = 240
- Width = 8655
- _ExtentX = 15266
- _ExtentY = 10186
- _Version = 393216
- AllowUpdate = 0 'False
- 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.Frame Frame4
- Caption = "服务管理部"
- Height = 2775
- Left = 240
- TabIndex = 47
- Top = 2280
- Width = 9135
- Begin VB.ComboBox Combo2
- Appearance = 0 'Flat
- DataField = "发餐卡"
- Height = 300
- Left = 7320
- TabIndex = 13
- Top = 360
- Width = 1455
- End
- Begin VB.ComboBox Combo1
- Appearance = 0 'Flat
- DataField = "发胸卡"
- Height = 300
- Left = 1440
- TabIndex = 11
- Top = 360
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发工装"
- Height = 525
- Index = 22
- Left = 1440
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 19
- Top = 1680
- Width = 2895
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发餐卡经办人"
- Height = 285
- Index = 10
- Left = 1440
- TabIndex = 14
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "服务管理部经理签字"
- Height = 285
- Index = 18
- Left = 1440
- TabIndex = 21
- Top = 2280
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发其他物品登记"
- Height = 525
- Index = 17
- Left = 5880
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 20
- Top = 1680
- Width = 2895
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发工具登记"
- Height = 525
- Index = 16
- Left = 5880
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 18
- Top = 1080
- Width = 2895
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发劳保登记"
- Height = 525
- Index = 15
- Left = 1440
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 17
- Top = 1080
- Width = 2895
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "协议经办人"
- Height = 285
- Index = 14
- Left = 7320
- TabIndex = 16
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "签安全协议"
- Height = 285
- Index = 13
- Left = 4320
- TabIndex = 15
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "发胸卡经办人"
- Height = 285
- Index = 12
- Left = 4320
- TabIndex = 12
- Top = 360
- Width = 1455
- End
- Begin VB.Label lblLabels
- Caption = "发工装"
- Height = 255
- Index = 25
- Left = 120
- TabIndex = 61
- Top = 1680
- Width = 1095
- End
- Begin VB.Label lblLabels
- Caption = "发餐卡"
- Height = 255
- Index = 24
- Left = 6120
- TabIndex = 60
- Top = 360
- Width = 1695
- End
- Begin VB.Label lblLabels
- Caption = "发餐卡经办人"
- Height = 255
- Index = 23
- Left = 120
- TabIndex = 59
- Top = 720
- Width = 1215
- End
- Begin VB.Label lblLabels
- Caption = "服务管理部经理签字:"
- Height = 375
- Index = 18
- Left = 120
- TabIndex = 55
- Top = 2280
- Width = 1095
- End
- Begin VB.Label lblLabels
- Caption = "发其他物品登记"
- Height = 375
- Index = 17
- Left = 4680
- TabIndex = 54
- Top = 1680
- Width = 975
- End
- Begin VB.Label lblLabels
- Caption = "发工具登记"
- Height = 255
- Index = 16
- Left = 4680
- TabIndex = 53
- Top = 1200
- Width = 975
- End
- Begin VB.Label lblLabels
- Caption = "发劳保登记"
- Height = 255
- Index = 15
- Left = 120
- TabIndex = 52
- Top = 1080
- Width = 1095
- End
- Begin VB.Label lblLabels
- Caption = "协议经办人"
- Height = 255
- Index = 14
- Left = 6120
- TabIndex = 51
- Top = 720
- Width = 1095
- End
- Begin VB.Label lblLabels
- Caption = "签安全协议"
- Height = 255
- Index = 13
- Left = 3120
- TabIndex = 50
- Top = 720
- Width = 1815
- End
- Begin VB.Label lblLabels
- Caption = "发胸卡经办人"
- Height = 255
- Index = 12
- Left = 3120
- TabIndex = 49
- Top = 360
- Width = 1095
- End
- Begin VB.Label lblLabels
- Caption = "发胸卡"
- Height = 255
- Index = 11
- Left = 120
- TabIndex = 48
- Top = 360
- Width = 1695
- End
- End
- Begin VB.Frame Frame2
- Caption = "人力资源部"
- Height = 1335
- Left = 240
- TabIndex = 43
- Top = 5160
- Width = 9135
- Begin MSComCtl2.DTPicker DTPicker2
- DataField = "入职教育时间"
- Height = 300
- Left = 1440
- TabIndex = 22
- Top = 360
- Width = 1455
- _ExtentX = 2566
- _ExtentY = 529
- _Version = 393216
- CheckBox = -1 'True
- DateIsNull = -1 'True
- Format = 127729665
- CurrentDate = 36191
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "补充说明"
- Height = 525
- Index = 21
- Left = 1440
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 24
- Top = 720
- Width = 7335
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "人事部经理签字"
- Height = 285
- Index = 20
- Left = 7320
- TabIndex = 23
- Top = 360
- Width = 1455
- End
- Begin VB.Label lblLabels
- Caption = "补充说明"
- Height = 255
- Index = 21
- Left = 120
- TabIndex = 46
- Top = 720
- Width = 1815
- End
- Begin VB.Label lblLabels
- Caption = "人事部经理签字"
- Height = 255
- Index = 20
- Left = 5160
- TabIndex = 45
- Top = 360
- Width = 1455
- End
- Begin VB.Label lblLabels
- Caption = "入职教育时间"
- Height = 255
- Index = 19
- Left = 120
- TabIndex = 44
- Top = 360
- Width = 1815
- End
- End
- Begin VB.Frame Frame3
- Caption = "基本情况"
- Height = 1815
- Left = 240
- TabIndex = 32
- Top = 360
- Width = 9135
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "员工号"
- Height = 285
- Index = 3
- Left = 1440
- TabIndex = 0
- Top = 360
- Width = 1455
- End
- Begin MSComCtl2.DTPicker DTPicker3
- DataField = "出生日期"
- Height = 300
- Left = 4200
- TabIndex = 4
- Top = 720
- Width = 1455
- _ExtentX = 2566
- _ExtentY = 529
- _Version = 393216
- CheckBox = -1 'True
- DateIsNull = -1 'True
- Format = 127729665
- CurrentDate = 36191
- End
- Begin MSComCtl2.DTPicker DTPicker1
- DataField = "入职时间"
- Height = 300
- Left = 4200
- TabIndex = 10
- Top = 1440
- Width = 1455
- _ExtentX = 2566
- _ExtentY = 529
- _Version = 393216
- CheckBox = -1 'True
- DateIsNull = -1 'True
- Format = 127729665
- CurrentDate = 36191
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "鞋号"
- Height = 285
- Index = 9
- Left = 1440
- TabIndex = 9
- Top = 1448
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "体重"
- Height = 285
- Index = 8
- Left = 7320
- TabIndex = 8
- Top = 1080
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "身高"
- Height = 285
- Index = 7
- Left = 4200
- TabIndex = 7
- Top = 1080
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "民族"
- Height = 285
- Index = 6
- Left = 1440
- TabIndex = 6
- Top = 1080
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "岗位名称"
- Height = 285
- Index = 4
- Left = 7320
- TabIndex = 5
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "性别"
- Height = 285
- Index = 2
- Left = 1440
- TabIndex = 3
- Top = 720
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "姓名"
- Height = 285
- Index = 1
- Left = 7320
- TabIndex = 2
- Top = 360
- Width = 1455
- End
- Begin VB.TextBox txtFields
- Appearance = 0 'Flat
- DataField = "部门"
- Height = 285
- Index = 0
- Left = 4200
- TabIndex = 1
- Top = 360
- Width = 1455
- End
- Begin VB.Label lblLabels
- Caption = "员 工 号"
- Height = 255
- Index = 22
- Left = 120
- TabIndex = 58
- Top = 375
- Width = 975
- End
- Begin VB.Label lblLabels
- Caption = "入职时间"
- Height = 255
- Index = 10
- Left = 3120
- TabIndex = 42
- Top = 1463
- Width = 855
- End
- Begin VB.Label lblLabels
- Caption = "鞋 号"
- Height = 255
- Index = 9
- Left = 120
- TabIndex = 41
- Top = 1463
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "体 重"
- Height = 255
- Index = 8
- Left = 6120
- TabIndex = 40
- Top = 1095
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "身 高"
- Height = 255
- Index = 7
- Left = 3120
- TabIndex = 39
- Top = 1095
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "民 族"
- Height = 255
- Index = 6
- Left = 120
- TabIndex = 38
- Top = 1095
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "岗位名称"
- Height = 255
- Index = 4
- Left = 6120
- TabIndex = 37
- Top = 735
- Width = 855
- End
- Begin VB.Label lblLabels
- Caption = "出生日期"
- Height = 255
- Index = 3
- Left = 3120
- TabIndex = 36
- Top = 735
- Width = 855
- End
- Begin VB.Label lblLabels
- Caption = "性 别"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 35
- Top = 735
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "姓 名"
- Height = 255
- Index = 1
- Left = 6120
- TabIndex = 34
- Top = 375
- Width = 615
- End
- Begin VB.Label lblLabels
- Caption = "部 门"
- Height = 255
- Index = 0
- Left = 3120
- TabIndex = 33
- Top = 375
- Width = 615
- End
- End
- End
- End
- End
- Attribute VB_Name = "F_RuZhiTongZhiShu"
- 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 Combo1_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- SendKeys "{TAB}"
- End If
- End Sub
- Private Sub Combo2_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- SendKeys "{TAB}"
- End If
- End Sub
- Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- SendKeys "{TAB}"
- End If
- End Sub
- Private Sub DTPicker3_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- SendKeys "{TAB}"
- End If
- End Sub
- 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
- Dim oText As TextBox
- 'Bind the text boxes to the data provider
- For Each oText In Me.txtFields
- Set oText.DataSource = adoPrimaryRS
- Next
- Set DTPicker1.DataSource = adoPrimaryRS
- Set DTPicker2.DataSource = adoPrimaryRS
- Set DTPicker3.DataSource = adoPrimaryRS
- Set Combo1.DataSource = adoPrimaryRS
- Set Combo2.DataSource = adoPrimaryRS
- Combo1.AddItem "是"
- Combo1.AddItem "否"
- Combo2.AddItem "是"
- Combo2.AddItem "否"
- 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
- On Error GoTo 0
- Exit Sub
- AddErr:
- MsgBox "增加操作有错误", vbExclamation + vbOKOnly, pTitle
- End Sub
- Private Sub cmdDelete_Click()
- On Error GoTo DeleteErr
- If MsgBox("是否确认删除入职通知书信息?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
- With adoPrimaryRS
- .Delete
- .MoveNext
- If .EOF Then .MoveLast
- End With
- On Error GoTo 0
- 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
- On Error GoTo 0
- Exit Sub
- RefreshErr:
- MsgBox "刷新操作有错误", vbExclamation + vbOKOnly, pTitle
- End Sub
- Private Sub cmdEdit_Click()
- On Error GoTo EditErr
- mbEditFlag = True
- SetButtons False
- On Error GoTo 0
- 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
- If MsgBox("是否确认此操作?", vbYesNo + vbQuestion, "系统提示") = vbNo Then Exit Sub
- adoPrimaryRS.UpdateBatch adAffectAll
- If mbAddNewFlag Then
- adoPrimaryRS.MoveLast 'move to the new record
- End If
- mbEditFlag = False
- mbAddNewFlag = False
- SetButtons True
- On Error GoTo 0
- 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
- Combo1.Enabled = Not bVal
- Combo2.Enabled = Not bVal
- End Sub
- Private Sub txtFields_KeyPress(Index As Integer, KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- SendKeys "{TAB}"
- End If
- End Sub
- Private Sub txtFields_LostFocus(Index As Integer)
- If Index = 3 Then
- Dim Sql3 As String
- Sql3 = "select distinct 部门 ,姓名 ,性别 ,出生日期 ,岗位,民族 ,身高 ,体重 ,进入公司时间 from 员工基本信息 where 员工号 = '" & txtFields(3).Text & "'"
- Set rs3 = db.Execute(Sql3)
- If Not rs3.EOF Then
- If Not IsNull(rs3("部门")) Then
- txtFields(0).Text = Trim(rs3("部门"))
- End If
- If Not IsNull(rs3("姓名")) Then
- txtFields(1).Text = Trim(rs3("姓名"))
- End If
- If Not IsNull(rs3("性别")) Then
- txtFields(2).Text = Trim(rs3("性别"))
- End If
- If Not IsNull(rs3("出生日期")) Then
- DTPicker3.Value = Trim(rs3("出生日期"))
- End If
- If Not IsNull(rs3("岗位")) Then
- txtFields(4).Text = Trim(rs3("岗位"))
- End If
- If Not IsNull(rs3("民族")) Then
- txtFields(6).Text = Trim(rs3("民族"))
- End If
- If Not IsNull(rs3("身高")) Then
- txtFields(7).Text = Trim(rs3("身高"))
- End If
- If Not IsNull(rs3("体重")) Then
- txtFields(8).Text = Trim(rs3("体重"))
- End If
- 'If Not IsNull(rs3("鞋号")) Then
- ' txtFields(9).Text = Trim(rs3("鞋号"))
- 'End If
- If Not IsNull(rs3("进入公司时间")) Then
- DTPicker1.Value = Trim(rs3("进入公司时间"))
- End If
- End If
- End If
- If Not IsNumeric(txtFields(7).Text) And (txtFields(7).Text <> "") Then
- MsgBox "请在“身高”中输入数字", vbExclamation + vbOKOnly, pTitle
- txtFields(7).SetFocus
- txtFields(7).SelLength = Len(txtFields(7))
- txtFields(7).SelStart = 0
- End If
- If Not IsNumeric(txtFields(8).Text) And (txtFields(8).Text <> "") Then
- MsgBox "请在“体重”中输入数字", vbExclamation + vbOKOnly, pTitle
- txtFields(8).SetFocus
- txtFields(8).SelLength = Len(txtFields(8))
- txtFields(8).SelStart = 0
- End If
- If Not IsNumeric(txtFields(9).Text) And (txtFields(9).Text <> "") Then
- MsgBox "请在“鞋号”中输入数字", vbExclamation + vbOKOnly, pTitle
- txtFields(9).SetFocus
- txtFields(9).SelLength = Len(txtFields(9))
- txtFields(9).SelStart = 0
- End If
- End Sub