?? 注銷會員.frm
字號:
VERSION 5.00
Begin VB.Form form11
Caption = "Form1"
ClientHeight = 3150
ClientLeft = 5895
ClientTop = 3090
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3360
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 495
Left = 1800
TabIndex = 3
Top = 2280
Width = 1095
End
Begin VB.Frame Frame1
Caption = "注銷會員"
Height = 1815
Left = 360
TabIndex = 0
Top = 240
Width = 3855
Begin VB.TextBox Text1
Height = 495
Left = 1200
TabIndex = 2
Top = 480
Width = 2175
End
Begin VB.Label Label1
Caption = "會員號"
Height = 495
Left = 120
TabIndex = 1
Top = 600
Width = 975
End
End
End
Attribute VB_Name = "form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim note As New ADODB.Recordset
Private Sub Command1_Click()
Dim sql As String
Dim answer As Integer
sql = "select * from 會員表 where 會員號='" & Trim(Text1.Text) & "'"
note.Open sql, cnn, 3, 2
If note.BOF And note.EOF Then
MsgBox ("無此記錄!") '查找會員,若無記錄則警告返回
note.Close
Text1.Text = ""
Else
answer = MsgBox("你確定要刪除這條記錄嗎?", vbYesNo, "提示")
If answer = vbYes Then
note.Delete
note.Close
MsgBox "刪除成功!"
Text1.Text = ""
Else
note.Close
Text1.Text = ""
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -