📄 frmmodifyfamily.frm
字号:
VERSION 5.00
Begin VB.Form frmModifyfamily
Caption = "修改员工家庭情况"
ClientHeight = 5415
ClientLeft = 60
ClientTop = 510
ClientWidth = 8010
LinkTopic = "Form1"
ScaleHeight = 5415
ScaleWidth = 8010
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 615
Left = 6240
TabIndex = 15
Top = 3600
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "修改"
Height = 615
Left = 6240
TabIndex = 14
Top = 2640
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 2760
TabIndex = 6
Top = 1680
Width = 2655
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmModifyfamily.frx":0000
Left = 2760
List = "frmModifyfamily.frx":000A
TabIndex = 5
Top = 2280
Width = 2655
End
Begin VB.TextBox Text2
Height = 375
Left = 2760
TabIndex = 4
Top = 2880
Width = 2655
End
Begin VB.TextBox Text3
Height = 375
Left = 2760
TabIndex = 3
Top = 3600
Width = 2655
End
Begin VB.TextBox Text4
Height = 375
Left = 2760
TabIndex = 2
Top = 4320
Width = 2655
End
Begin VB.TextBox Text5
Height = 375
Left = 2760
TabIndex = 1
Top = 480
Width = 2655
End
Begin VB.TextBox Text6
Height = 375
Left = 2760
TabIndex = 0
Top = 1080
Width = 2655
End
Begin VB.Label Label1
Caption = "员工编号:"
Height = 255
Left = 1680
TabIndex = 13
Top = 480
Width = 1335
End
Begin VB.Label Label2
Caption = "家属姓名:"
Height = 255
Left = 1680
TabIndex = 12
Top = 1680
Width = 975
End
Begin VB.Label Label3
Caption = "性别:"
Height = 375
Left = 1680
TabIndex = 11
Top = 2280
Width = 975
End
Begin VB.Label Label4
Caption = "年龄:"
Height = 375
Left = 1680
TabIndex = 10
Top = 2880
Width = 615
End
Begin VB.Label Label5
Caption = "与本人关系:"
Height = 375
Left = 1560
TabIndex = 9
Top = 3600
Width = 1215
End
Begin VB.Label Label6
Caption = "工作单位:"
Height = 375
Left = 1560
TabIndex = 8
Top = 4320
Width = 1095
End
Begin VB.Label Label7
Caption = "员工姓名:"
Height = 375
Left = 1680
TabIndex = 7
Top = 1080
Width = 1095
End
End
Attribute VB_Name = "frmModifyfamily"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Private Sub Command1_Click()
Dim txtSQL As String
On Error GoTo er
Set mrc = New ADODB.Recordset
With mrc
.ActiveConnection = cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
End With
txtSQL = "update 员工家庭成员情况表 set ygname='" & Text6.Text & "',name='" & Text1.Text & "',sex='" & Combo2.Text & "',age='" & Text2.Text & "',relationship='" & Text3.Text & "',company='" & Text4.Text & "' where ygid=" & Text5.Text
mrc.Open txtSQL
MsgBox "员工家庭信息修改成功!"
txtSQL = "select * from 员工家庭成员情况表 where ygid='" & Text5.Text & "'"
mrc.Open txtSQL
Set DataGrid1.DataSource = stdrs
DataGrid1.ReBind
If isAdding Then isAdding = False
Exit Sub
er:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -