📄 f_buyuanshenqing.frm
字号:
Left = 1800
TabIndex = 5
Top = 4920
Width = 1815
End
Begin VB.TextBox txtFields
DataField = "岗位名称"
Enabled = 0 'False
Height = 285
Index = 3
Left = 1800
TabIndex = 4
Top = 840
Width = 1815
End
Begin VB.TextBox txtFields
DataField = "编号"
Height = 285
Index = 0
Left = 5040
TabIndex = 3
Top = 360
Width = 1815
End
Begin VB.Label lblLabels
Caption = "工作项目说明:"
Height = 255
Index = 14
Left = 240
TabIndex = 42
Top = 3240
Width = 1095
End
Begin VB.Label lblLabels
Caption = "所学专业要求:"
Height = 255
Index = 13
Left = 240
TabIndex = 40
Top = 2520
Width = 1095
End
Begin VB.Label lblLabels
Caption = "学历要求:"
Height = 255
Index = 12
Left = 240
TabIndex = 38
Top = 1800
Width = 1095
End
Begin VB.Label lblLabels
Caption = "年龄要求:"
Height = 255
Index = 11
Left = 240
TabIndex = 36
Top = 1320
Width = 1095
End
Begin VB.Label lblLabels
Caption = "部门经理签字:"
Height = 255
Index = 8
Left = 240
TabIndex = 20
Top = 5520
Width = 1095
End
Begin VB.Label lblLabels
Caption = "签字时间:"
Height = 255
Index = 9
Left = 5640
TabIndex = 19
Top = 5520
Width = 1095
End
Begin VB.Label lblLabels
Caption = "说明:"
Height = 255
Index = 10
Left = 240
TabIndex = 18
Top = 6000
Width = 1095
End
Begin VB.Label lblLabels
Caption = "新增条件:"
Height = 255
Index = 6
Left = 240
TabIndex = 17
Top = 4080
Width = 1095
End
Begin VB.Label lblLabels
Caption = "性别要求:"
Height = 255
Index = 5
Left = 3840
TabIndex = 16
Top = 960
Width = 1095
End
Begin VB.Label lblLabels
Caption = "预计上岗时间:"
Height = 255
Index = 7
Left = 5640
TabIndex = 15
Top = 5040
Width = 1095
End
Begin VB.Label lblLabels
Caption = "补员数量:"
Height = 255
Index = 4
Left = 240
TabIndex = 14
Top = 5040
Width = 1095
End
Begin VB.Label lblLabels
Caption = "岗位名称:"
Height = 255
Index = 3
Left = 240
TabIndex = 13
Top = 840
Width = 1095
End
Begin VB.Label lblLabels
Caption = "岗位编号:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 7200
TabIndex = 12
Top = 360
Width = 1095
End
Begin VB.Label lblLabels
Caption = "部门:"
Height = 255
Index = 1
Left = 240
TabIndex = 11
Top = 360
Width = 1095
End
Begin VB.Label lblLabels
Caption = "编号:"
Height = 255
Index = 0
Left = 3840
TabIndex = 10
Top = 360
Width = 1095
End
End
End
End
End
Attribute VB_Name = "F_BuYuanShenQing"
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_Click()
Dim sql2 As String
Combo2.Clear
sql2 = "select distinct 岗位编号 from 岗位说明 where 所属部门 = '" & Combo1.Text & "'"
Set rs2 = db.Execute(sql2)
While Not rs2.EOF
Combo2.AddItem Trim(rs2("岗位编号"))
rs2.MoveNext
Wend
End Sub
Private Sub Combo2_Click()
Dim Sql3 As String
Sql3 = "select distinct 岗位名称 ,性别要求 ,年龄要求 ,学历要求 , 所学专业要求 , 工作项目说明 from 岗位说明 where 岗位编号 = '" & Combo2.Text & "'"
Set rs3 = db.Execute(Sql3)
If Not IsNull(rs3("岗位名称")) Then
txtFields(3).Text = Trim(rs3("岗位名称"))
End If
If Not IsNull(rs3("性别要求")) Then
txtFields(5).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
txtFields(7).Text = Trim(rs3("所学专业要求"))
End If
If Not IsNull(rs3("工作项目说明")) Then
txtFields(9).Text = Trim(rs3("工作项目说明"))
End If
End Sub
Private Sub Form_Load()
Dim SqlBuMen As String
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 Combo1.DataSource = adoPrimaryRS
Set Combo2.DataSource = adoPrimaryRS
Dim oDTP As DTPicker
'Bind the DTPicker to the data provider
For Each oDTP In Me.DTPickers
Set oDTP.DataSource = adoPrimaryRS
Next
SqlBuMen = "select distinct 部门名称 from 部门维护表"
Set RsBuMen = db.Execute(SqlBuMen)
While Not RsBuMen.EOF
Combo1.AddItem Trim(RsBuMen("部门名称"))
RsBuMen.MoveNext
Wend
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 oText 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
Combo1.Enabled = Not bVal
Combo2.Enabled = Not bVal
txtFields(4).Enabled = Not bVal
txtFields(8).Enabled = Not bVal
txtFields(10).Enabled = Not bVal
DTPickers(0).Enabled = Not bVal
DTPickers(1).Enabled = Not bVal
If bVal Then
Set DataGrid1.DataSource = adoPrimaryRS
Else
Set DataGrid1.DataSource = Nothing
End If
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
If Not IsNumeric(txtFields(4).Text) And (txtFields(4).Text <> "") Then
MsgBox "请在“补员数量”中输入数字", vbExclamation + vbOKOnly, pTitle
txtFields(4).SetFocus
txtFields(4).SelStart = 0
txtFields(4).SelLength = Len(txtFields(4))
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -