📄 frmdeladmin.frm
字号:
VERSION 5.00
Begin VB.Form frmDelAdmin
BackColor = &H80000013&
Caption = "删除操作员"
ClientHeight = 2745
ClientLeft = 5220
ClientTop = 4860
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 2745
ScaleWidth = 4140
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 2280
TabIndex = 4
Top = 2040
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确 认"
Height = 375
Left = 840
TabIndex = 3
Top = 2040
Width = 975
End
Begin VB.TextBox username
Height = 375
Left = 1320
TabIndex = 2
Top = 1200
Width = 1695
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H80000013&
Caption = "用户名:"
Height = 180
Left = 600
TabIndex = 1
Top = 1320
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H80000013&
Caption = "删除操作员"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 435
Left = 960
TabIndex = 0
Top = 240
Width = 2250
End
End
Attribute VB_Name = "frmDelAdmin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
' 作者:林永刚
' 名称:frmDelAdmin
' 功能:删除操作员。
'****************************************************************************
Private Sub Command1_Click()
Dim rs_del As New ADODB.Recordset
Dim sql_del As String
sql_del = "select * from admins where yhmc='" & username.Text & "'"
Set rs_del = ADOSQL(sql_del)
If username.Text = "" Then
MsgBox "请输入用户名!"
username.SetFocus
Exit Sub
End If
If rs_del.EOF Then
MsgBox "该用户已经不存在!"
Exit Sub
Else
sql_del = "delete from admins where yhmc='" & username.Text & "'"
Set rs_del = ADOSQL(sql_del)
MsgBox "删除成功!"
Unload Me
Exit Sub
End If
rs_del.Close
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -