📄 frmdeletedepartment.frm
字号:
VERSION 5.00
Begin VB.Form frmDeletedepartment
Caption = "删除部门信息"
ClientHeight = 3315
ClientLeft = 60
ClientTop = 510
ClientWidth = 7395
LinkTopic = "Form1"
ScaleHeight = 3315
ScaleWidth = 7395
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 5520
TabIndex = 2
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "删除"
Height = 495
Left = 5520
TabIndex = 1
Top = 1440
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Left = 1680
TabIndex = 0
Top = 960
Width = 3135
End
Begin VB.Label Label1
Caption = "请输入要删除的部门的编号:"
Height = 255
Left = 600
TabIndex = 3
Top = 480
Width = 2895
End
End
Attribute VB_Name = "frmDeletedepartment"
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 Dep_id= '" & 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 + -