?? frmdeleuser.frm
字號:
VERSION 5.00
Begin VB.Form frmDeleuser
Caption = "刪除用戶"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消刪除"
Height = 495
Left = 2640
TabIndex = 5
Top = 2160
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "確定刪除"
Height = 495
Left = 840
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 2400
PasswordChar = "*"
TabIndex = 3
Top = 1200
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Index = 0
Left = 2400
TabIndex = 0
Top = 480
Width = 1695
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "用戶密碼"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 2
Top = 1200
Width = 1335
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "用戶名稱"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 1
Top = 480
Width = 1335
End
End
Attribute VB_Name = "frmDeleuser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim mrcc As ADODB.Recordset
Dim MsgText As String
If Trim(Text1(0).Text) = "" Then
MsgBox "請輸入用戶名稱!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Text1(0).SetFocus
Else
txtSQL = "select * from user_Info where user_id='" & Text1(0).Text & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
If mrc.EOF = True Or mrc.BOF = True Then
MsgBox "該用戶不存在,請重新輸入用戶名!", vbOKOnly + vbExclamation, "警告"
Text1(0).Text = ""
Text1(1).Text = ""
Text1(0).SetFocus
Else
If Trim(mrc.Fields(1)) = Trim(Text1(1)) Then
txtSQL = "delete * from user_Info where user_id='" & Text1(0).Text & "'"
Set mrcc = ExecuteSQL(txtSQL, MsgText)
MsgBox "刪除用戶成功!", vbOKOnly + vbExclamation, "刪除用戶"
Text1(0).Text = ""
Text1(1).Text = ""
Else
MsgBox "密碼不正確,不能刪除該用戶!", vbOKOnly + vbExclamation, "警告"
Text1(1).SetFocus
Text1(1).Text = ""
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1(0).Text = ""
Text1(1).Text = ""
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -