📄 delcustomer.frm
字号:
VERSION 5.00
Begin VB.Form delcustomer
Caption = "删除会员"
ClientHeight = 6030
ClientLeft = 3810
ClientTop = 3060
ClientWidth = 8685
LinkTopic = "Form1"
ScaleHeight = 6030
ScaleWidth = 8685
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "删除会员"
ForeColor = &H00764E10&
Height = 2625
Left = 2640
TabIndex = 0
Top = 1920
Width = 4905
Begin VB.CommandButton command1
BackColor = &H00E2D1D3&
Caption = "删除"
Default = -1 'True
Height = 375
Left = 1680
MaskColor = &H00987758&
Style = 1 'Graphical
TabIndex = 3
Top = 1680
UseMaskColor = -1 'True
Width = 1335
End
Begin VB.CommandButton Command2
BackColor = &H00E2D1D3&
Caption = "取消"
Height = 375
Left = 3165
MaskColor = &H00987758&
Style = 1 'Graphical
TabIndex = 2
Top = 1680
UseMaskColor = -1 'True
Width = 1335
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
ForeColor = &H00987758&
Height = 315
Left = 1785
MaxLength = 15
TabIndex = 1
ToolTipText = "Enter LogIn ID Here"
Top = 675
Width = 2745
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "会员号:"
ForeColor = &H00987758&
Height = 285
Left = 345
TabIndex = 4
Top = 705
Width = 1425
End
End
End
Attribute VB_Name = "delcustomer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub command1_Click()
If Text1.Text = "" Then
MsgBox "Enter a customer ID:", vbCritical
Text1.SetFocus
Exit Sub
End If
Call openconn
sqlstr = "select * from customer where customerid = '" & Text1.Text & "' "
Call rs(sqlstr)
If (adoRS.EOF) Then
MsgBox "Wrong customerid ! Try Again With Correct customerid", vbCritical
Text1.Text = ""
Text1.SetFocus
Call closeconn
Exit Sub
End If
Call closeconn
Call openconn
sqlstr = "select * from users where customerid = '" & Text1.Text & "'"
Call rs(sqlstr)
If (adoRS.EOF) Then
MsgBox "customerid (" & Text1.Text & ") Does Not Exist! Enter Valid customerid", vbCritical
Text1.Text = ""
Text1.SetFocus
Call closeconn
Exit Sub
End If
Call closeconn
MsgBox "Customerid Deleted Successfully!", vbInformation
Unload Me
Call openconn
sqlstr = "delete from customer where customerid = '" & Text1.Text & "'"
Call rs(sqlstr)
Call closeconn
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -