📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form scForm
Caption = "删除职工"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3000
TabIndex = 4
Top = 2280
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "删除"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 3
Top = 2280
Width = 1215
End
Begin VB.TextBox bhtxt
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 2
Top = 1320
Width = 2415
End
Begin VB.Frame Frame1
Caption = "注意"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 360
TabIndex = 1
Top = 120
Width = 3975
Begin VB.Label Label2
Caption = "此操作将永久删除职工所有信息。"
ForeColor = &H000000C0&
Height = 375
Left = 240
TabIndex = 5
Top = 360
Width = 3255
End
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "个人编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 600
TabIndex = 0
Top = 1440
Width = 1050
End
End
Attribute VB_Name = "scForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
If bhtxt.Text = "" Then
MsgBox "请输入个人编号。"
Else
Set rs = New ADODB.Recordset
sql = "delete from gzxx where 个人编号=" + "'" + bhtxt.Text + "'"
rs.Open sql, cn
MsgBox "删除完成。", 48, "提示"
End If
End Sub
Private Sub Command2_Click()
scForm.Hide
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\gz.mdb;Persist Security Info=False"
cn.CursorLocation = adUseClient
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -