?? 刪除用戶.frm
字號:
VERSION 5.00
Begin VB.Form Frm_DelUser
BorderStyle = 1 'Fixed Single
Caption = "刪除用戶"
ClientHeight = 4275
ClientLeft = 45
ClientTop = 330
ClientWidth = 4815
Icon = "刪除用戶.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4275
ScaleWidth = 4815
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 3
Top = 3120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "刪除"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3120
TabIndex = 2
Top = 2160
Width = 1215
End
Begin VB.ListBox List1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3420
Left = 1200
TabIndex = 0
Top = 360
Width = 1455
End
Begin VB.Label Label2
Caption = $"刪除用戶.frx":1042
ForeColor = &H00FF0000&
Height = 975
Left = 3000
TabIndex = 4
Top = 600
Width = 1455
End
Begin VB.Label Label1
Caption = "用戶名:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Left = 360
TabIndex = 1
Top = 240
Width = 855
End
End
Attribute VB_Name = "Frm_DelUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If List1.Text = "" Then
MsgBox "請輸入用戶名!", vbOKOnly, "警告"
Exit Sub
End If
vbyorn = MsgBox("確定要刪除嗎?", vbOKCancel, "警告")
If vbyorn = vbOK Then
Frm_LiulanUser.Adodc1.Recordset.Delete
Frm_LiulanUser.Adodc1.Recordset.MoveNext
'MsgBox "刪除成功!", vbOKOnly, "恭喜"
List1.RemoveItem List1.ListIndex
End If
Frm_LiulanUser.Adodc1.Refresh
'Frm_LiulanUser.DataGrid1.Refresh
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim a As String
Frm_LiulanUser.Adodc1.RecordSource = "select * from 用戶資料"
Frm_LiulanUser.Adodc1.Refresh
Do While Not Frm_LiulanUser.Adodc1.Recordset.EOF
a = Frm_LiulanUser.Adodc1.Recordset.Fields(0)
List1.AddItem a
Frm_LiulanUser.Adodc1.Recordset.MoveNext
Loop
List1.Text = ""
End Sub
Private Sub List1_Click()
Frm_LiulanUser.Adodc1.RecordSource = "select * from 用戶資料 where 用戶名 = '" & Trim(List1.Text) & "'"
Frm_LiulanUser.Adodc1.Refresh
Frm_LiulanUser.DataGrid1.Refresh
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -