📄 员工家庭成员情况表.frm
字号:
VERSION 5.00
Begin VB.Form frmAddfamily
Caption = "员工家庭成员情况表"
ClientHeight = 6030
ClientLeft = 60
ClientTop = 510
ClientWidth = 8220
LinkTopic = "Form2"
Picture = "员工家庭成员情况表.frx":0000
ScaleHeight = 6030
ScaleWidth = 8220
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text6
Height = 375
Left = 2880
TabIndex = 15
Top = 1440
Width = 2655
End
Begin VB.TextBox Text5
Height = 375
Left = 2880
TabIndex = 13
Top = 840
Width = 2655
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 6360
TabIndex = 12
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "保存"
Height = 495
Left = 6360
TabIndex = 11
Top = 3240
Width = 1095
End
Begin VB.TextBox Text4
Height = 375
Left = 2880
TabIndex = 10
Top = 4680
Width = 2655
End
Begin VB.TextBox Text3
Height = 375
Left = 2880
TabIndex = 8
Top = 3960
Width = 2655
End
Begin VB.TextBox Text2
Height = 375
Left = 2880
TabIndex = 6
Top = 3240
Width = 2655
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "员工家庭成员情况表.frx":A04C
Left = 2880
List = "员工家庭成员情况表.frx":A056
TabIndex = 4
Top = 2640
Width = 2655
End
Begin VB.TextBox Text1
Height = 375
Left = 2880
TabIndex = 2
Top = 2040
Width = 2655
End
Begin VB.Label Label7
Caption = "员工姓名:"
Height = 375
Left = 1800
TabIndex = 14
Top = 1440
Width = 1095
End
Begin VB.Label Label6
Caption = "工作单位:"
Height = 375
Left = 1680
TabIndex = 9
Top = 4680
Width = 1095
End
Begin VB.Label Label5
Caption = "与本人关系:"
Height = 375
Left = 1680
TabIndex = 7
Top = 3960
Width = 1215
End
Begin VB.Label Label4
Caption = "年龄:"
Height = 375
Left = 1800
TabIndex = 5
Top = 3240
Width = 615
End
Begin VB.Label Label3
Caption = "性别:"
Height = 375
Left = 1800
TabIndex = 3
Top = 2640
Width = 975
End
Begin VB.Label Label2
Caption = "家属姓名:"
Height = 255
Left = 1800
TabIndex = 1
Top = 2040
Width = 975
End
Begin VB.Label Label1
Caption = "员工编号:"
Height = 255
Left = 1800
TabIndex = 0
Top = 840
Width = 1335
End
End
Attribute VB_Name = "frmAddfamily"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
' Dim txtSQL As String
Dim MsgText As String
' Dim mrc As ADODB.Recordset
Private Sub Command1_Click()
Dim txtSQL As String
Set mrc = New ADODB.Recordset
With mrc
.ActiveConnection = cnn
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
End With
txtSQL = "insert into 员工家庭成员情况表 (ygid,ygname,name,sex,age,relationship,company)"
txtSQL = txtSQL & "values('"
txtSQL = txtSQL & Text5.Text & "','"
txtSQL = txtSQL & Text6.Text & "','"
txtSQL = txtSQL & Text1.Text & "','"
txtSQL = txtSQL & Combo2.Text & "','"
txtSQL = txtSQL & Text2.Text & "','"
txtSQL = txtSQL & Text3.Text & "','"
txtSQL = txtSQL & Text4.Text & "'"
txtSQL = txtSQL & ")"
mrc.Open txtSQL '执行SQL语句
MsgBox "信息插入成功!", vbOKOnly + vbExclamation, "员工家庭信息情况"
'If Not stdrs.EOF Then
'MsgBox "插入成功!"
Set mrc = Nothing
contiue = False
'End If
Exit Sub
End Sub
'Dim mrc As ADODB.Recordset
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -