📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00C0FFC0&
Caption = "销户"
ClientHeight = 3765
ClientLeft = 60
ClientTop = 450
ClientWidth = 6330
LinkTopic = "Form1"
ScaleHeight = 3765
ScaleWidth = 6330
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
BackColor = &H00FFFF80&
Caption = "确 定"
Height = 495
Left = 1200
TabIndex = 2
Top = 2760
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "返 回"
Height = 495
Left = 3600
TabIndex = 1
Top = 2760
Width = 1455
End
Begin VB.Label Label3
BackColor = &H00C0FFC0&
Caption = "注意:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00004000&
Height = 495
Left = 240
TabIndex = 4
Top = 1560
Width = 735
End
Begin VB.Label Label2
BackColor = &H00C0FFC0&
Caption = "尊敬的用户,如果您想要销户,请按双击“确定”键,谢谢!"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1080
TabIndex = 3
Top = 1560
Width = 4215
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00C0FFC0&
Caption = "您确定要销户吗?"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1320
TabIndex = 0
Top = 600
Width = 3615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Dim response
Set db = OpenDatabase(App.Path + "/cw.mdb") '打开数据库
Set rs1 = db.OpenRecordset("SELECT * FROM PersonCount")
Set rs2 = db.OpenRecordset("SELECT * FROM Person")
NameQuery = frmFirst.txtName.Text '查找当前登陆用户的记录集
rs1.MoveFirst
Do Until rs1.EOF
If rs1.Fields("用户名") Like LCase(NameQuery) Then
With rs1
.Delete
.MoveLast
End With
Else
rs1.MoveNext
End If
Loop
rs2.MoveFirst
Do Until rs2.EOF
If rs2.Fields("用户名") Like LCase(NameQuery) Then
With rs2
.Delete
.MoveLast
End With
Exit Sub
Else
rs2.MoveNext
End If
Loop
m = MsgBox("帐户已经成功注销!", vbOKOnly + vbInformation, "操作成功!")
If m = 1 Then
Form1.Show
Unload Me
frmFirst.Show
frmFirst.txtName = ""
frmFirst.txtPass = ""
End If
If response = 1 Then
End
End If
Unload Me
frmFirst.Show
End Sub
Private Sub Command1_Click()
Unload Me
frmInfor.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -