📄 jmpa_empedit.frm
字号:
VERSION 5.00
Begin VB.Form Form6
BorderStyle = 3 'Fixed Dialog
Caption = "职员修改"
ClientHeight = 3825
ClientLeft = 45
ClientTop = 435
ClientWidth = 5070
Icon = "JmPa_empEdit.frx":0000
LinkTopic = "Form6"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 5070
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.ComboBox Combo3
Height = 300
Left = 1680
Style = 2 'Dropdown List
TabIndex = 13
Top = 2520
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 495
Left = 2400
TabIndex = 11
Top = 3120
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确 认"
Height = 495
Left = 480
TabIndex = 10
Top = 3120
Width = 975
End
Begin VB.ComboBox Combo2
Height = 300
Left = 1680
Style = 2 'Dropdown List
TabIndex = 9
Top = 2040
Width = 735
End
Begin VB.TextBox Text3
Height = 375
Left = 1680
TabIndex = 8
Text = "Text3"
Top = 1560
Width = 3135
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1680
Style = 2 'Dropdown List
TabIndex = 7
Top = 1080
Width = 735
End
Begin VB.TextBox Text2
Height = 375
Left = 1680
TabIndex = 6
Text = "Text2"
Top = 600
Width = 3135
End
Begin VB.TextBox Text1
Height = 375
Left = 1680
TabIndex = 5
Text = "Text1"
Top = 120
Width = 3135
End
Begin VB.Label Label6
Caption = "部门名称:"
Height = 255
Left = 120
TabIndex = 12
Top = 2520
Width = 1335
End
Begin VB.Label Label5
Caption = "是否离职:"
Height = 255
Left = 120
TabIndex = 4
Top = 2040
Width = 1335
End
Begin VB.Label Label4
Caption = "代发银行卡号:"
Height = 255
Left = 120
TabIndex = 3
Top = 1560
Width = 1335
End
Begin VB.Label Label3
Caption = "职员性别:"
Height = 255
Left = 120
TabIndex = 2
Top = 1080
Width = 1335
End
Begin VB.Label Label2
Caption = "职员名称:"
Height = 255
Left = 120
TabIndex = 1
Top = 600
Width = 1335
End
Begin VB.Label Label1
Caption = "职员代码:"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 1335
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'确认
Set femp_updateconn = CreateObject("adodb.connection")
femp_updateconn.Open connstring
If Trim(Text2.Text) <> "" Then
If Trim(Combo1.Text) <> "" Then
If Trim(Combo2.Text) <> "" Then
If Trim(Combo3.Text) <> "" Then
Set rsemp_update = femp_updateconn.Execute("update Pa_emp set Fempname=" & "'" & Trim(Text2.Text) & "'" & "," & "Fempsex=" & "'" & Trim(Combo1.Text) & "'" & "," & "Fempbankid=" & "'" & Trim(Text3.Text) & "'" & "," & "Femplosed=" & "'" & Trim(Combo2.Text) & "'" & "," & "Fempbm=" & "'" & Combo3.Text & "'" & " where Fempid=" & "'" & Trim(Text1.Text) & "'")
Else
MsgBox "请选择部门名称!", vbOKOnly + vbInformation, "提示"
End If
Else
MsgBox "请认真选择“是否离职”资料!", vbOKOnly + vbInformation, "提示"
End If
Else
MsgBox "请认真选择“职员性别”资料!", vbOKOnly + vbInformation, "提示"
End If
Else
MsgBox "请认真填写“职员名称”资料!", vbOKOnly + vbInformation, "提示"
End If
femp_updateconn.Close
Call Form5.fado_emp
Unload Me
End Sub
Private Sub Command2_Click()
'取消
Unload Me
End Sub
Private Sub Form_Load()
Combo1.AddItem "男", 0
Combo1.AddItem "女", 1
Combo2.AddItem "否", 0
Combo2.AddItem "是", 1
'加载部门信息
Call fbmload
End Sub
Sub fbmload()
'加载部门
Set connloadbma = CreateObject("adodb.connection")
connloadbma.Open connstring
Set rs_loadbma = connloadbma.Execute("select * from Pa_bm")
bmia = 0
Combo3.Clear
Do While rs_loadbma.EOF <> True
Combo3.AddItem rs_loadbma.Fields!fbmname, bmia
bmia = bmia + 1
rs_loadbma.MoveNext
Loop
rs_loadbma.Close
connloadbma.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -