📄 frmdeletefamily.frm
字号:
VERSION 5.00
Begin VB.Form frmDeletefamily
Caption = "删除员工家庭信息"
ClientHeight = 5160
ClientLeft = 60
ClientTop = 510
ClientWidth = 7530
LinkTopic = "Form1"
ScaleHeight = 5160
ScaleWidth = 7530
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 615
Left = 1200
TabIndex = 2
Top = 1800
Width = 3495
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 735
Left = 5640
TabIndex = 1
Top = 3120
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "删除"
Height = 735
Left = 5520
TabIndex = 0
Top = 1320
Width = 1455
End
Begin VB.Label Label1
Caption = "输入要删除家庭情况的员工的编号: "
Height = 375
Left = 600
TabIndex = 3
Top = 1200
Width = 3015
End
End
Attribute VB_Name = "frmDeletefamily"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset
Dim MsgText As String
Private Sub Command2_Click()
Unload Me
End Sub
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
MsgBox "员工家庭信息删除成功!"
txtSQL = "delete from 员工家庭成员情况表 where ygid= '" & Text1.Text & "'"
mrc.Open txtSQL
'txtSQL = "execute myproc"
'mrc.Open txtSQL
Set DataGrid1.DataSource = mrc
DataGrid1.ReBind
If isAdding Then isAdding = False
Exit Sub
er:
MsgBox Err.Description
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -