📄 form11.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form11
Caption = "删除用户"
ClientHeight = 3750
ClientLeft = 60
ClientTop = 345
ClientWidth = 5325
LinkTopic = "Form11"
ScaleHeight = 3750
ScaleWidth = 5325
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 2400
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=RSGL.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=RSGL.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 495
Left = 3120
TabIndex = 5
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 495
Left = 1080
TabIndex = 4
Top = 2880
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 2640
PasswordChar = "*"
TabIndex = 2
Top = 1920
Width = 1575
End
Begin VB.TextBox Text1
Height = 495
Left = 2640
TabIndex = 1
Top = 1200
Width = 1575
End
Begin VB.Label Label3
Caption = "输入要删除用户的信息:"
BeginProperty Font
Name = "幼圆"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000001&
Height = 375
Left = 960
TabIndex = 6
Top = 360
Width = 3255
End
Begin VB.Label Label2
Caption = "用 户 密 码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 840
TabIndex = 3
Top = 2040
Width = 1455
End
Begin VB.Label Label1
Caption = "用 户 姓 名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 840
TabIndex = 0
Top = 1320
Width = 1335
End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim b As String
Adodc1.RecordSource = "select * from 用户管理 where 用户姓名='" & Text1.Text & "'"
Adodc1.Refresh
If Text1.Text = xingming Then
MsgBox xingming & "正在使用,不允许删除!"
Form1.Show
Unload Me
Else
If Text1.Text = "" Or Text2.Text = "" Then
a = MsgBox("用户姓名或密码不能为空!", , "错误!")
Else
If Adodc1.Recordset.EOF Then
a = MsgBox("不存在此用户!", , "错误!")
Else
If Adodc1.Recordset.Fields("用户密码") = Text2.Text Then
b = MsgBox("确实要删除此用户吗?", 1, "删除用户")
If b = 1 Then
Adodc1.Recordset.Delete '删除此用户
Adodc1.Recordset.Update
c = MsgBox("此用户纪录已删除!", , "操作成功!")
End If
Else
a3 = MsgBox("用户密码不正确!", , "错误!")
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Form11.Left = 2800
Form11.Top = 2000
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -