?? user_del.frm
字號:
VERSION 5.00
Begin VB.Form user_del
BorderStyle = 3 'Fixed Dialog
Caption = "用戶刪除"
ClientHeight = 1695
ClientLeft = 5025
ClientTop = 4770
ClientWidth = 3510
Icon = "user_del.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1695
ScaleWidth = 3510
ShowInTaskbar = 0 'False
Begin VB.ComboBox cmd_user_del
Height = 300
Left = 360
TabIndex = 2
Top = 600
Width = 1575
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 2160
TabIndex = 1
Top = 840
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "確定"
Height = 375
Left = 2160
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label1
Caption = "用戶名:"
Height = 495
Left = 480
TabIndex = 3
Top = 240
Width = 1215
End
End
Attribute VB_Name = "user_del"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Sql = "select u_name from [user]"
Set RS = dbSelect(Sql)
While Not RS.EOF
cmd_user_del.AddItem RS.Fields(0)
RS.MoveNext
Wend
Set RS = Nothing
End Sub
Private Sub OKButton_Click()
'從庫中刪除用戶
If Trim(Me.cmd_user_del.Text) <> "" Then
Sql = "delete from [user] where u_name='" & Trim(Me.cmd_user_del.Text) & "'"
dbOperate Sql
Unload Me
Else
MsgBox "請選擇要刪除的用戶"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -